💥 change cqhttp ding session id

This commit is contained in:
Reverier-Xu 2021-03-10 01:40:37 +08:00 committed by yanyongyu
parent 4661adc564
commit 7f27957164
2 changed files with 8 additions and 0 deletions

View File

@ -199,6 +199,10 @@ class GroupMessageEvent(MessageEvent):
if x.is_text() else f"<le>{escape_tag(str(x))}</le>", if x.is_text() else f"<le>{escape_tag(str(x))}</le>",
self.message)) + '"') self.message)) + '"')
@overrides(MessageEvent)
def get_session_id(self) -> str:
return f"group_{self.group_id}_{self.user_id}"
# Notice Events # Notice Events
class NoticeEvent(Event): class NoticeEvent(Event):

View File

@ -143,3 +143,7 @@ class GroupMessageEvent(MessageEvent):
@overrides(MessageEvent) @overrides(MessageEvent)
def is_tome(self) -> bool: def is_tome(self) -> bool:
return self.isInAtList return self.isInAtList
@overrides(MessageEvent)
def get_session_id(self) -> str:
return f"group_{self.conversationId}_{self.senderId}"