fix(simplex): extract group sender from chatDir.groupMember - #35046
Open
brandon-btcgroup wants to merge 1 commit into
Open
fix(simplex): extract group sender from chatDir.groupMember#35046brandon-btcgroup wants to merge 1 commit into
brandon-btcgroup wants to merge 1 commit into
Conversation
For group messages, current simplex-chat reports the sending member under `chatItem.chatDir.groupMember`. The adapter only read the legacy `chatItem.chatItemMember` key, which is absent in this payload shape, so `sender_id` fell back to the chat_id (e.g. "group:1") — not a real member. Downstream allowlist matching then failed, since the chat_id is never a valid user id. Read `chatDir.groupMember` first and fall back to `chatItemMember` for older daemon payloads. Also resolve the display name via `memberProfile` when the member object doesn't carry it directly. Verified end-to-end against a live simplex-chat daemon: the correct base64 memberId and display name are now extracted for inbound group messages. Adds a regression test asserting sender extraction from the chatDir.groupMember layout.
15 tasks
brandon-btcgroup
added a commit
to brandon-btcgroup/hermes-agent
that referenced
this pull request
May 30, 2026
…ening Adds a 2026-05-29 part-2 update: sender fix upstreamed as issue NousResearch#35045 / PR NousResearch#35046; rationale for NOT opening a group-send PR (already covered by NousResearch#4666/NousResearch#27978 with a more robust json form); production branch hardened to the /_send <ref> json form (commit d31a043) to stop multi-line reply truncation; and a rebase note for the eventual NousResearch#26433 merge conflict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced May 30, 2026
Contributor
|
Thanks for isolating the sender-parsing compatibility case. Problems
Suggested changes
Automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes group-message sender extraction in the SimpleX Chat platform adapter
(
plugins/platforms/simplex/adapter.py).For group messages, current
simplex-chatreports the sending member underchatItem.chatDir.groupMember. The adapter only read the legacychatItem.chatItemMemberkey, which is absent in this payload shape. As aresult
sender_idfell back to thechat_id(e.g."group:1") — which isnever a real member id — and downstream allowlist matching fails, so the
bot can't identify who sent a group message even when delivery otherwise works.
The fix reads
chatDir.groupMemberfirst and falls back tochatItemMemberfor older daemon payloads, and resolves the display name via
memberProfilewhen the member object doesn't carry it directly.
Related Issue
Related to #30150, which documents three other SimpleX adapter bugs (missing
/_startsubscribe,newChatItemsresp-nesting, and/_sendcommand syntax).This PR addresses a fourth, independent bug — sender extraction — that is
not tracked by that issue. Happy to open a dedicated issue if maintainers
prefer one on file.
Fixes #35045
Type of Change
Changes Made
plugins/platforms/simplex/adapter.py— read the group sender fromchatItem.chatDir.groupMember, falling back to the legacychatItem.chatItemMember; resolvedisplayNameviamemberProfile.tests/gateway/test_simplex_plugin.py— addtest_group_sender_from_chatdir_groupmemberasserting the correctmemberId/display name are extracted from thechatDir.groupMemberlayout.How to Test
simplex-chatdaemon and join the bot to a group.lives under
chatItem.chatDir.groupMember(nochatItemMemberkey present).sender_idresolves to thechat_id("group:<n>"), so themember is unidentifiable and allowlist checks against the real
memberIdfail. After:
sender_idis the member's base64memberIdand thedisplay name resolves correctly.
scripts/run_tests.sh tests/gateway/test_simplex_plugin.py(28 passing here, incl. the new regression test).
Relationship to existing PRs (duplicate check)
I searched open PRs before submitting:
sender-extraction bug. This PR is complementary, not a duplicate; it isolates
the one fix that's missing from that PR.
chatDir.groupMemberchange, but bundled inside hundreds of lines of otherwork. This PR offers it as a small, independently-reviewable fix.
If maintainers would rather fold this single change into #26433 or one of the
feature PRs, I'm happy to close this and move the diff there.
Checklist
Code
fix(simplex): …)scripts/run_tests.sh— SimpleX plugin suite 28/28 pass. The full suite has some failures, but they are pre-existing on unmodifiedmain(anthropic adapter, gateway service/WSL/systemd, TUI — environment-specific on macOS) and confirmed unrelated to this change; this PR introduces no new failures.Documentation & Housekeeping
cli-config.yaml.example— N/A (no config keys changed)CONTRIBUTING.md/AGENTS.md— N/A