fix: 统一test权限判定并支持TG话题父级匹配

This commit is contained in:
clown145
2026-02-12 15:41:07 +08:00
committed by Helian Nuits
parent bd46b932e6
commit 926e0df095
2 changed files with 16 additions and 2 deletions
+7 -1
View File
@@ -919,7 +919,13 @@ class QQGroupDailyAnalysis(Star):
yield event.plain_result("✅ 已重新加载配置并重启定时任务")
elif action == "test":
if not self.config_manager.is_group_allowed(group_id):
check_target = getattr(event, "unified_msg_origin", None)
if not check_target:
check_target = (
f"{self._get_platform_id_from_event(event)}:GroupMessage:{group_id}"
)
if not self.config_manager.is_group_allowed(check_target):
yield event.plain_result("❌ 请先启用当前群的分析功能")
return