pull/65/head
foxplaying 2025-10-14 23:32:58 +08:00 committed by GitHub
parent 3a930c4150
commit 8d5d64a753
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 2 deletions

View File

@ -120,6 +120,15 @@ class NoticeHandler:
)
if handled_message and user_info:
if is_target_self:
send_group_info = None
if group_id:
fetched_group_info = await get_group_info(self.server_connection, group_id)
group_name = fetched_group_info.get("group_name") if fetched_group_info else None
send_group_info = GroupInfo(
platform=global_config.maibot_server.platform_name,
group_id=group_id,
group_name=group_name,
)
await message_send_instance.message_send(
MessageBase(
message_info=BaseMessageInfo(
@ -127,7 +136,7 @@ class NoticeHandler:
message_id="poke",
time=time.time(),
user_info=user_info,
group_info=None,
group_info=send_group_info,
template_info=None,
format_info=FormatInfo(
content_format=["text"],
@ -341,7 +350,7 @@ class NoticeHandler:
except Exception as e:
logger.warning(f"解析戳一戳消息失败: {str(e)},将使用默认文本")
text_str = f"{display_name}{first_txt}{target_name}{second_txt}这是QQ的一个功能用于提及某人但没那么明显"
text_str = f"{first_txt}{target_name}{second_txt}这是QQ的一个功能用于提及某人但没那么明显"
seg_data: Seg = Seg(type="text", data=text_str)
user_info: UserInfo = UserInfo(