From 6f32bf9621b1d80ffd83766d6442952ca58b7cdc Mon Sep 17 00:00:00 2001 From: wangcham Date: Mon, 10 Feb 2025 10:01:48 -0500 Subject: [PATCH] fix: wecom userid --- pkg/platform/sources/wecom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/platform/sources/wecom.py b/pkg/platform/sources/wecom.py index f6ea64ab..5d127958 100644 --- a/pkg/platform/sources/wecom.py +++ b/pkg/platform/sources/wecom.py @@ -189,7 +189,9 @@ class WecomeAdapter(adapter.MessageSourceAdapter): message_source, self.bot_account_id, self.bot ) content_list = await WecomMessageConverter.yiri2target(message, self.bot) - fixed_user_id = Wecom_event.user_id.lstrip('u') + fixed_user_id = Wecom_event.user_id + # 删掉开头的u + fixed_user_id = fixed_user_id[1:] for content in content_list: if content["type"] == "text": await self.bot.send_private_msg(fixed_user_id, Wecom_event.agent_id, content["content"])