Skip to main content

Module allowlist

Module allowlist 

Source
Expand description

Shared allowed_users matching used by every chat channel.

Each channel (Slack, Discord, IRC, Telegram, Matrix, …) carries an allowed_users: Vec<String> allowlist with the same semantics:

  • ["*"] (or any list containing "*") means “anyone”.
  • Empty list means “deny everyone” (channel is on but no inbound is accepted yet — matches the “configured but not opened” stance the channel docs use).
  • Otherwise, exact match against the user’s identifier wins.

IRC nicks are case-insensitive per RFC 2812; Matrix MXIDs are also case-insensitive. Most other channels (Slack user IDs, Discord snowflakes, Telegram usernames) are case-sensitive. The Match::Sensitive / Match::CaseInsensitive selector encodes that per-channel choice without growing a parallel impl.

Enums§

Match
Case-sensitivity selector for the allowlist comparison. The chat platform defines which one applies; the helper does not infer.

Functions§

is_user_allowed
Return true when user is allowed under allowed.