加入验证判断逻辑,以为是true,结果是文本。导致所有群都收到了消息

This commit is contained in:
liuwei
2025-02-17 15:39:38 +08:00
parent dc5be6c728
commit f8c73659f2
2 changed files with 7 additions and 2 deletions

View File

@@ -153,6 +153,11 @@ class Robot(Job):
return True
# 群管理自动加入,减少服务重启管理
else:
# 如果是群消息并且群没开启AI则不处理该动作
if msg.from_group() and self.gbm.get_group_permission(msg.roomid,
Feature.AI_CAPABILITY) == PermissionStatus.DISABLED:
self.sendTextMsg("群AI功能未开启", msg.roomid, msg.sender)
return True
rsp = self.chat.get_answer(q, (msg.roomid if msg.from_group() else msg.sender))
if rsp: