fix(review): apply PR #3774 review fixes

- Clear pending_user_turn after shortcut command persistence
- Guard is_allowed against None allow_from values
- Update pairing help text for two-arg revoke
- Reuse format_expiry in CLI pairing list
This commit is contained in:
chengyongru
2026-05-15 15:46:44 +08:00
committed by Xubin Ren
parent b68e9fa21e
commit eab35af9f3
4 changed files with 10 additions and 9 deletions
+3 -3
View File
@@ -195,11 +195,11 @@ class BaseChannel(ABC):
"""
if isinstance(self.config, dict):
if "allow_from" in self.config:
allow_list = self.config.get("allow_from")
allow_list = self.config.get("allow_from") or []
else:
allow_list = self.config.get("allowFrom", [])
allow_list = self.config.get("allowFrom", []) or []
else:
allow_list = getattr(self.config, "allow_from", [])
allow_list = getattr(self.config, "allow_from", []) or []
if "*" in allow_list:
return True
if str(sender_id) in allow_list: