Skip to content

Commit

Permalink
Merge pull request #2408 from 6vision/fix-summary-image
Browse files Browse the repository at this point in the history
图像识别逻辑优化
  • Loading branch information
zhayujie authored Dec 2, 2024
2 parents bdc3820 + 0f8efcb commit 8bf633f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/linkai/linkai.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,14 @@ def _is_summary_open(self, context) -> bool:
group_name = context.get("msg").from_user_nickname
app_code = self._fetch_group_app_code(group_name)
if app_code:
remote_enabled = Util.fetch_app_plugin(app_code, "内容总结")
if context.type.name in ["FILE", "SHARING"]:
remote_enabled = Util.fetch_app_plugin(app_code, "内容总结")
else:
# 非群聊场景使用全局app_code
app_code = conf().get("linkai_app_code")
if app_code:
remote_enabled = Util.fetch_app_plugin(app_code, "内容总结")
if context.type.name in ["FILE", "SHARING"]:
remote_enabled = Util.fetch_app_plugin(app_code, "内容总结")

# 基础条件:总开关开启且消息类型符合要求
base_enabled = (
Expand Down

0 comments on commit 8bf633f

Please sign in to comment.