Conversation
Group messages cleared the SIMPLEX_GROUP_ALLOWED gate in the adapter, but the gateway then re-checked the sending group member against SIMPLEX_ALLOWED_USERS -- a DM-contact allowlist group members aren't in -- so every opted-in group message was silently dropped. Set role_authorized on the source once the group allowlist gate passes (the same signal the Discord adapter sets after a role check), so the gateway honors the adapter's intake decision. DMs stay gated by SIMPLEX_ALLOWED_USERS; with SIMPLEX_GROUP_ALLOWED unset, group messages are still dropped before this point -- no fail-open.
|
Thanks for the focused SimpleX authorization fix. The premise remains valid on current main: The adapter's only The surrounding current-main hunk remains compatible with the PR diff, so this should be mechanically salvageable. Automated hermes-sweeper review. |
What & why
SimpleX group messages were silently dropped even when the operator opted the group in via
SIMPLEX_GROUP_ALLOWED.The adapter gates group messages against
SIMPLEX_GROUP_ALLOWEDat intake, but never carried that decision to the gateway._is_user_authorizedthen re-checked the sending group member againstSIMPLEX_ALLOWED_USERS— a DM-contact allowlist that group members aren't in — so the message was denied. This contradicts the documented behavior ("a bot in a group … processes every member's traffic").Fix
Set
role_authorized=Trueon the source once a group message clears theSIMPLEX_GROUP_ALLOWEDgate — the same signal the Discord adapter sets after a role check, which the gateway already honors. One line + a comment in the adapter.Not a fail-open: DMs stay gated by
SIMPLEX_ALLOWED_USERS, and withSIMPLEX_GROUP_ALLOWEDunset, group messages are dropped before this point.Tests
Added 5 tests to
tests/gateway/test_simplex_plugin.py:role_authorized=Truerole_authorized=False(stays gated)role_authorizedis authorized even when the member isn't inSIMPLEX_ALLOWED_USERSrole_authorizedis deniedResults:
tests/gateway/test_simplex_plugin.py— 35 passed