pull/1524/merge
2829798842 2026-02-27 07:38:15 +08:00 committed by GitHub
commit dde00d126d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 配置中查找 # 其他平台:尝试从 platforms 配置中查找
platform_account = platform_accounts.get(platform, "") platform_account = platform_accounts.get(platform, "")
if platform_account: if platform_account:
return user_id_str == platform_account if user_id_str == platform_account:
return True
return user_id_str == qq_account
# 默认情况:与主 QQ 账号比较(兼容性) # 默认情况:与主 QQ 账号比较(兼容性)
return user_id_str == qq_account return user_id_str == qq_account

View File

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