Repository navigation
[CHA-5933] Keep message_id backward compatible on Event - #279
Merged
Merged
Conversation
Event.messageId from #278 was a typed Jackson field, so a top-level message_id on message.*, reminder.* and poll.* webhooks moved out of getAdditionalFields() and getAdditionalFields().get("message_id") returned null after upgrading. getMessageId()/setMessageId() now read and write the additional-fields map instead, so parsing and serialization match 1.50.0 and both accessors return the ID on every event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ianb-gs
approved these changes
Oct 21, 2026
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.
Ticket
TLDR
Event.messageIdmapped tomessage_id. The backend sends a top-levelmessage_idon everymessage.*,reminder.*andpoll.*webhook. With the change, Jackson routes that key into the typed field instead ofgetAdditionalFields(). Code that readsgetAdditionalFields().get("message_id")getsnullafter upgrading, with no compile error.getMessageId()/setMessageId()now read and write the additional-fields map, so parsing and serialization match 1.50.0.getMessageId()works on every event, includingscheduled_message.sent.Summary
Addresses mogita's review comment on #278: #278 (comment)
Event.java:messageIdis no longer a@JsonPropertyfield. The accessors are backed byadditionalFields["message_id"], and the Javadoc now describes it as the ID of the message the event is about.ScheduledMessageTest: thescheduled_message.senttest also asserts the map entry. A newmessage.newtest checks thatmessage_idstays ingetAdditionalFields(), is readable viagetMessageId(), and is serialized exactly once asmessage_id.Verified locally with JDK 11:
spotlessCheck,javadoc,ScheduledMessageTest(9/9).🤖 Generated with Claude Code