Skip to content

Commit

Permalink
chore: 群聊内支持消息的任意位置@机器人 (iuiaoin#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
maq917 authored Jun 14, 2023
1 parent 8713437 commit 8a4e5ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion channel/wechat.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def handle_group(self, msg):
context = dict()
context["session_id"] = sender_id if session_independent else room_id
sender_name = self.get_sender_name(room_id, sender_id)
if query.startswith(f"@{personal_name}"):
atlist = msg["id3"]
if self.personal_info["wx_id"] in atlist:
cooked_query = query.replace(f"@{personal_name}", "", 1).strip()
create_image_prefix = conf().get("create_image_prefix")
match_prefix = check_prefix(cooked_query, create_image_prefix)
Expand Down

0 comments on commit 8a4e5ad

Please sign in to comment.