Skip to content

[CHA-5933] Keep message_id backward compatible on Event - #279

Merged
nijeesh-stream merged 2 commits into
mainfrom
fix/cha-5933-event-message-id
Oct 21, 2026
Merged

nijeesh-stream merged 2 commits into
mainfrom
fix/cha-5933-event-message-id

Conversation

@nijeesh-stream

Copy link
Copy Markdown
Contributor

Ticket

TLDR

  • Problem: [CHA-5933] feat: support scheduled messages #278 (unreleased) added a typed Event.messageId mapped to message_id. The backend sends a top-level message_id on every message.*, reminder.* and poll.* webhook. With the change, Jackson routes that key into the typed field instead of getAdditionalFields(). Code that reads getAdditionalFields().get("message_id") gets null after upgrading, with no compile error.
  • Fix: drop the Jackson-mapped field. getMessageId() / setMessageId() now read and write the additional-fields map, so parsing and serialization match 1.50.0. getMessageId() works on every event, including scheduled_message.sent.
  • Risk: low. The public API from [CHA-5933] feat: support scheduled messages #278 is unchanged, and JSON on the wire is unchanged from 1.50.0.

Summary

Addresses mogita's review comment on #278: #278 (comment)

  • Event.java: messageId is no longer a @JsonProperty field. The accessors are backed by additionalFields["message_id"], and the Javadoc now describes it as the ID of the message the event is about.
  • ScheduledMessageTest: the scheduled_message.sent test also asserts the map entry. A new message.new test checks that message_id stays in getAdditionalFields(), is readable via getMessageId(), and is serialized exactly once as message_id.

Verified locally with JDK 11: spotlessCheck, javadoc, ScheduledMessageTest (9/9).

🤖 Generated with Claude Code

nijeesh-stream and others added 2 commits October 19, 2026 15:25
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>
@nijeesh-stream
nijeesh-stream merged commit 342f303 into main Oct 21, 2026
5 checks passed
@nijeesh-stream
nijeesh-stream deleted the fix/cha-5933-event-message-id branch October 21, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants