Skip to content

fix(chat): name the users a join notice is about - #1804

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/chat-system-message-names
Oct 17, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/chat-system-message-names

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

System messages showed only the server's fallback_text, which names no one. SystemContent.user_joined carries the user who joined and, for an admitted join, who let them in, but ProtobufToLocal dropped it.

  • MessageContent.System now has an optional SystemEvent.UserJoined(userId, admittedBy). DIRECT and an unset method map to a plain join; a missing user_id or an unknown type maps to no event. The reverse mapper writes it back.
  • The stored JSON gains two optional hex fields, so no Room migration. Rows stored before this have neither and keep showing the fallback text.
  • displayText words the notice from current profiles: "Alex joined the group", "Sam added Alex", and "you" for the viewer ("You joined the group", "Sam added you", "You added Alex"). If a name it needs isn't known yet, the row reads as the fallback text.
  • The transcript names users from the group's sender profiles and requests any it is missing, the same way quoted authors are named. The chat list preview uses the same wording, and unnamedGroupSender asks for the users a notice names, since a notice has no sender.

iOS has the same gap (ConversationMessage.swift maps every system type to its fallback text); that change will go in its own PR.

System messages drew only the server's fallback text, which names no one.
SystemContent.user_joined carries the joiner and, when admitted, who let
them in; the mapper dropped it. Keep it on MessageContent.System, store it
with the message, and word the notice from current profiles: "Alex joined
the group", "Sam added Alex", with the viewer as "you". A name not known
yet is requested, and the row reads as the fallback text until it lands.
The chat list preview names them the same way.
@bmc08gt bmc08gt self-assigned this Oct 17, 2026
@github-actions github-actions Bot added type: fix Bug fix area: network gRPC, connectivity, API, exchange rates and removed type: fix Bug fix labels Oct 17, 2026
@bmc08gt
bmc08gt merged commit 29796e5 into code/cash Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant