Skip to content

Accept string numbers in emoji charmaps - #5

Merged
iFixRobots merged 2 commits into
mainfrom
indent/groupme-string-charmap
Oct 31, 2026
Merged

iFixRobots merged 2 commits into
mainfrom
indent/groupme-string-charmap

Conversation

@indent

@indent indent Bot commented Oct 31, 2026

Copy link
Copy Markdown

Production push logs show failed to decode GroupMe push message: json: cannot unmarshal string into Message.attachments.0.charmap.0.0 of type int for 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 emoji attachments, and that client sends the charmap pairs as strings ([["<pack>","<index>"]]) where other clients send integers. Attachment.Charmap was [][]int, so one string failed the whole push message.

This adds an IntPairs type (still [][]int underneath, so callers indexing it don't change) whose UnmarshalJSON accepts both JSON numbers and numeric strings, and uses it for Charmap. Anything that isn't a number still returns a decode error, which is reported through HandleError. Marshalling is unchanged.

The bridge bump follows in beeper/groupme.

View in Indent
Tag @indent to continue the conversation here.

@iFixRobots
iFixRobots merged commit b70209d into main Oct 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants