Fix: Correct data type mismatch in AtBotRule (#1705)

Fix can't '@' in QQ group.
This commit is contained in:
Thetail001
2025-10-04 00:20:27 +08:00
committed by GitHub
parent d1274366a0
commit 3b181cff93

View File

@@ -21,7 +21,7 @@ class AtBotRule(rule_model.GroupRespondRule):
def remove_at(message_chain: platform_message.MessageChain):
nonlocal found
for component in message_chain.root:
if isinstance(component, platform_message.At) and component.target == query.adapter.bot_account_id:
if isinstance(component, platform_message.At) and str(component.target) == str(query.adapter.bot_account_id):
message_chain.remove(component)
found = True
break