Skip to content

Commit

Permalink
🐛 fix group message event openid
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Nov 23, 2023
1 parent 0b5c2ce commit 0642c3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nonebot/adapters/qq/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class GroupAtMessageCreateEvent(QQMessageEvent):
__type__ = EventType.GROUP_AT_MESSAGE_CREATE

author: GroupMemberAuthor
group_id: str
group_openid: str
to_me: bool = True

@override
Expand All @@ -393,13 +393,13 @@ def get_user_id(self) -> str:

@override
def get_session_id(self) -> str:
return f"group_{self.group_id}_{self.author.member_openid}"
return f"group_{self.group_openid}_{self.author.member_openid}"

@override
def get_event_description(self) -> str:
return escape_tag(
f"Message {self.id} from "
f"{self.author.member_openid}@[Group:{self.group_id}]: "
f"{self.author.member_openid}@[Group:{self.group_openid}]: "
f"{self.get_message()!r}"
)

Expand Down

0 comments on commit 0642c3e

Please sign in to comment.