Support wildcard "*" in allowFrom channel config
All checks were successful
Build Nanobot OAuth / build (push) Successful in 1m57s
All checks were successful
Build Nanobot OAuth / build (push) Successful in 1m57s
Allow "*" in the allowFrom list to explicitly permit all senders, as an alternative to the empty-list-means-allow-all behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,11 +69,15 @@ class BaseChannel(ABC):
|
||||
True if allowed, False otherwise.
|
||||
"""
|
||||
allow_list = getattr(self.config, "allow_from", [])
|
||||
|
||||
|
||||
# If no allow list, allow everyone
|
||||
if not allow_list:
|
||||
return True
|
||||
|
||||
|
||||
# Wildcard allows everyone
|
||||
if "*" in allow_list:
|
||||
return True
|
||||
|
||||
sender_str = str(sender_id)
|
||||
if sender_str in allow_list:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user