Repository navigation
Accept string numbers in emoji charmaps - #5
Merged
Merged
Conversation
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.
Production push logs show
failed to decode GroupMe push message: json: cannot unmarshal string into Message.attachments.0.charmap.0.0 of type intfor two accounts in the same group, at the moment a still sticker was sent from the GroupMe iOS app. The message never reached the bridge and later catch-up skipped it, so it was lost.Still stickers are
emojiattachments, and that client sends the charmap pairs as strings ([["<pack>","<index>"]]) where other clients send integers.Attachment.Charmapwas[][]int, so one string failed the whole push message.This adds an
IntPairstype (still[][]intunderneath, so callers indexing it don't change) whoseUnmarshalJSONaccepts both JSON numbers and numeric strings, and uses it forCharmap. Anything that isn't a number still returns a decode error, which is reported throughHandleError. Marshalling is unchanged.The bridge bump follows in beeper/groupme.
Tag
@indentto continue the conversation here.