Skip to content

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

Merged
bmc08gt merged 1 commit into
mainfrom
fix/chat-system-message-names
Oct 19, 2026
Merged

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

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Join notices on iOS show only the server's fallback_text, which doesn't say who joined. Android names the users since code-payments/code-android-app#1804. This reads the user_joined fields that flipcash2-client-protocol 0.19.0 already carries (main is pinned to it, so there's no bump here) and words the notice the same way Android does: "Ada joined the group", "You joined the group", "Ada added Bob", "Ada added you", "You added Bob".

  • ConversationMessage.Content.system gains an optional SystemEvent. user_joined with a valid user_id becomes .userJoined(userID:admittedBy:). An unset type or invalid id leaves only the fallback text.
  • The store keeps the event in two nullable columns, systemUserId and systemAdmittedBy, so Database.schemaVersion goes from 52 to 53.
  • SystemNoticeStrings.text(for:fallbackText:selfID:nameOf:) picks the sentence. The transcript and the chat list's last-message line both use it. If a named user's profile hasn't loaded yet, the notice shows the fallback text until it does.
  • The users a notice names are added to the profile requests: the conversation's unnamed-author lookup and the chat list's unnamedLastMessageSenders.
  • Spotlight still indexes the fallback text, since it has no profile lookup.

Tests: new SystemNoticeStringsTests, plus cases in ConversationModelMappingTests (proto mapping), ChatMessageMappingTests, ConversationControllerTests (list preview and profile requests) and DatabaseConversationsTests (column round-trip).

System messages showed only the server's fallback text, which names no
one. Read SystemContent.user_joined (who joined, and who admitted them)
into the message, keep it in two new nullable message columns, and word
the notice from the chat's current profiles: "Ada joined the group",
"Ada added Bob", "Ada added you", "You added Bob", "You joined the
group". Until a named user's profile loads, the notice shows the
fallback text and the profile is requested; the chat list preview does
the same.
@bmc08gt bmc08gt self-assigned this Oct 18, 2026
@bmc08gt
bmc08gt merged commit 598a9c9 into main Oct 19, 2026
2 of 3 checks passed
@bmc08gt
bmc08gt deleted the fix/chat-system-message-names branch October 19, 2026 14:50
bmc08gt added a commit that referenced this pull request Oct 19, 2026
* origin/main:
  fix(chat): name the users a join notice is about (#1090)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant