Description
When allow_bot_messages = "all" is configured, bot messages correctly pass the bot gate (mode check + trusted_bot_ids), but are then rejected by the user allowlist check at src/discord.rs:474. The user gate does not distinguish between bot and human authors, so bot messages are denied unless the bot's ID is manually added to allowed_users.
This means allow_bot_messages and allowed_users are coupled in a way that contradicts the documented behavior — the bot gate should be sufficient to authorize bot messages.
Steps to Reproduce
- Configure
config.toml with:
allow_bot_messages = "all"
trusted_bot_ids = []
allow_all_users = false
allowed_users = ["<your_human_user_id>"]
- Have another bot send a message in an allowed channel
- Observe that the bot reacts with 🚫 and logs
"denied user, ignoring"
- Add the other bot's ID to
allowed_users → it works
Expected Behavior
Bot messages that pass the bot gate (allow_bot_messages + trusted_bot_ids) should not be blocked by the user allowlist. The user gate should only apply to human (non-bot) messages.
Environment
- OpenAB version: latest (
main branch, commit e914f70)
- Platform: Discord
- Relevant code:
src/discord.rs line 474–479
Screenshots / Logs
tracing::info!(user_id = %msg.author.id, "denied user, ignoring");
Suggested fix — add !msg.author.bot guard at line 474:
if !msg.author.bot
&& !self.allow_all_users
&& !self.allowed_users.contains(&msg.author.id.get())
{
...
}
src/slack.rs may need the same fix if it shares this pattern.

Description
When
allow_bot_messages = "all"is configured, bot messages correctly pass the bot gate (mode check +trusted_bot_ids), but are then rejected by the user allowlist check atsrc/discord.rs:474. The user gate does not distinguish between bot and human authors, so bot messages are denied unless the bot's ID is manually added toallowed_users.This means
allow_bot_messagesandallowed_usersare coupled in a way that contradicts the documented behavior — the bot gate should be sufficient to authorize bot messages.Steps to Reproduce
config.tomlwith:"denied user, ignoring"allowed_users→ it worksExpected Behavior
Bot messages that pass the bot gate (
allow_bot_messages+trusted_bot_ids) should not be blocked by the user allowlist. The user gate should only apply to human (non-bot) messages.Environment
mainbranch, commite914f70)src/discord.rsline 474–479Screenshots / Logs
Suggested fix — add
!msg.author.botguard at line 474:src/slack.rsmay need the same fix if it shares this pattern.