fix(telegram): whitelist property 返回字串導致按鈕無反應
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 13m0s

security_interceptor.whitelist 返回 settings.OPENCLAW_TG_USER_WHITELIST
(字串),但 is_whitelisted 做 user_id in whitelist(int in str),
Python 報 "requires string as left operand, not int"。

修正:改呼叫 settings.get_tg_user_whitelist() 返回 list[int]。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-05 13:40:52 +08:00
parent b5905ae283
commit 76f3ffd7f7

View File

@@ -236,7 +236,7 @@ class TelegramSecurityInterceptor:
@property
def whitelist(self) -> list[int]:
"""取得白名單 user_id 列表"""
return settings.OPENCLAW_TG_USER_WHITELIST
return settings.get_tg_user_whitelist()
def is_whitelisted(self, user_id: int) -> bool:
"""