fix: at_list bug in wechat channel

This commit is contained in:
zhayujie
2023-09-01 13:45:04 +08:00
parent 6fc158e7d6
commit 054f927c05
2 changed files with 4 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ class ChatChannel(Channel):
flag = True flag = True
pattern = f"@{re.escape(self.name)}(\u2005|\u0020)" pattern = f"@{re.escape(self.name)}(\u2005|\u0020)"
subtract_res = re.sub(pattern, r"", content) subtract_res = re.sub(pattern, r"", content)
if isinstance(context["msg"].at_list, list):
for at in context["msg"].at_list: for at in context["msg"].at_list:
pattern = f"@{re.escape(at)}(\u2005|\u0020)" pattern = f"@{re.escape(at)}(\u2005|\u0020)"
subtract_res = re.sub(pattern, r"", subtract_res) subtract_res = re.sub(pattern, r"", subtract_res)

View File

@@ -4,7 +4,6 @@
"channel_type": "wx", "channel_type": "wx",
"proxy": "", "proxy": "",
"hot_reload": false, "hot_reload": false,
"claude_api_cookie": "",
"single_chat_prefix": [ "single_chat_prefix": [
"bot", "bot",
"@bot" "@bot"