Repository navigation
fix(chat): name the users a join notice is about - #1804
Merged
Merged
Conversation
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.
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.
System messages showed only the server's
fallback_text, which names no one.SystemContent.user_joinedcarries the user who joined and, for an admitted join, who let them in, butProtobufToLocaldropped it.MessageContent.Systemnow has an optionalSystemEvent.UserJoined(userId, admittedBy).DIRECTand an unset method map to a plain join; a missinguser_idor an unknown type maps to no event. The reverse mapper writes it back.displayTextwords 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.unnamedGroupSenderasks for the users a notice names, since a notice has no sender.iOS has the same gap (
ConversationMessage.swiftmaps every system type to its fallback text); that change will go in its own PR.