feat: resolve group message senders to room-specific nicknames - #16
Merged
Merged
Conversation
eyaeya
marked this pull request as ready for review
July 26, 2026 04:16
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.
Summary
RoomDatanicknames while preserving stable sender IDs and contact-level display names.contact.dbis unavailable or unreadable, or the member is absent from currentRoomData.Output contract
For group messages:
sender_wxidremains the stable identity.sender_group_nicknameis emitted only when a room-scoped nickname is resolved reliably.sender_contact_displaypreserves a distinct contact-level display name when available.senderprefers group nickname, then contact display, then raw sender ID.Private messages retain their existing behavior. Unresolved optional fields are omitted.
Implementation notes
chat_room.ext_bufferRoomData protobuf.refermsg.fromusr, reject room IDs as member IDs, and filter fallback results to requested members.Validation
go test -count=1 ./...go test -race -count=1 ./cmd/wechat-cligo vet ./...git diff --checkCGO_ENABLED=0cross-compilation of./cmd/wechat-cliAll committed tests use synthetic room, member, nickname, and message values.
Closes #15