fix(GroupJoinRequest): fix build msg author error

This commit is contained in:
omg-xtao 2022-03-08 20:10:35 +08:00 committed by GitHub
parent dfb1421f84
commit a08633715c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -397,13 +397,13 @@ class GoCQHttp(BaseClient):
context["group_id"] = str(context["group_id"]) + "_notification" context["group_id"] = str(context["group_id"]) + "_notification"
context["message_type"] = "group" context["message_type"] = "group"
context["event_description"] = "\u2139 New Group Join Request" context["event_description"] = "\u2139 New Group Join Request"
original_group = self.get_group_info(context["group_id"], False) original_group = self.get_group_info(context["group_id_orig"], False)
group_name = context["group_id"] group_name = context["group_id"]
if original_group is not None and "group_name" in original_group: if original_group is not None and "group_name" in original_group:
group_name = original_group["group_name"] group_name = original_group["group_name"]
msg = Message() msg = Message()
msg.uid = "group" + "_" + str(context["group_id"]) msg.uid = "group" + "_" + str(context["group_id"])
msg.author = self.chat_manager.build_efb_chat_as_system_user(context) msg.author = (self.chat_manager.build_efb_chat_as_system_user(context)).other
msg.chat = self.chat_manager.build_efb_chat_as_group(context) msg.chat = self.chat_manager.build_efb_chat_as_group(context)
msg.deliver_to = coordinator.master msg.deliver_to = coordinator.master
msg.type = MsgType.Text msg.type = MsgType.Text