Skip to content

Accept numeric IDs in push messages - #1

Merged
Fizzadar merged 1 commit into
mainfrom
iFixRobots/numeric-push-ids
Oct 27, 2026
Merged

Fizzadar merged 1 commit into
mainfrom
iFixRobots/numeric-push-ids

Conversation

@iFixRobots

Copy link
Copy Markdown

Messages that mention someone often never arrive over push. GroupMe's web client sends mention user_ids as numbers and GroupMe relays them unchanged, but ID only unmarshals strings. Decoding the whole push message fails, and the handler drops it without logging anything:

json: cannot unmarshal number into Go struct field Attachment.attachments.user_ids of type groupme.ID

ID now also accepts JSON numbers. If a push message still can't be decoded, the error goes to the handlers' HandleError so it shows up in logs.

Before After
Push message with a numeric mention ID Dropped silently Delivered
Push message that can't be decoded No trace Reported to handlers

Changelog: Fixed GroupMe messages with mentions sometimes not arriving.

Before / after

I haven't tested this on a live account yet; it needs a bridge build with this version. Decoding a mention attachment with a numeric user_ids entry fails with the error above before this change and decodes to the ID after it.

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

@Fizzadar

Copy link
Copy Markdown

Tested live via beeper/groupme#25 on a self-hosted bridge, GroupMe messages with mentions now come through where main dropped them entirely. LGTM!

@Fizzadar
Fizzadar merged commit a385d1c into main Oct 27, 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