增加platform判断自身支持

pull/1524/head
2829798842 2026-02-27 07:32:08 +08:00
parent b63b7a7fb9
commit e5c6ff1365
2 changed files with 6 additions and 2 deletions

View File

@ -108,7 +108,9 @@ def is_bot_self(platform: str, user_id: str) -> bool:
# 其他平台:尝试从 platforms 配置中查找
platform_account = platform_accounts.get(platform, "")
if platform_account:
return user_id_str == platform_account
if user_id_str == platform_account:
return True
return user_id_str == qq_account
# 默认情况:与主 QQ 账号比较(兼容性)
return user_id_str == qq_account

View File

@ -273,7 +273,9 @@ class Person:
# 其他平台:尝试从 platforms 配置中查找
platform_account = platform_accounts.get(platform, "")
if platform_account:
return user_id_str == platform_account
if user_id_str == platform_account:
return True
return user_id_str == qq_account
# 默认情况:与主 QQ 账号比较(兼容性)
return user_id_str == qq_account