Skip to content

Conversation

@gnprice
Copy link
Member

@gnprice gnprice commented Jan 13, 2026

There were a number of incidental changes to the format of notification payloads which we decided to make in tandem with the switch to E2EE notifications (#1764). The new format is documented, more or less, here:
https://zulip.com/api/mobile-notifications#payload-examples

This PR has us start understanding the new format, while continuing to parse the old format and produce the same internal data types as for the new format.

This doesn't yet include the actual decryption; that'll be for a future PR.

We'll stop needing these with the new E2EE notifications, because
the notification payloads will come to us as actual JSON rather than
as a string-string map.  Start by getting our hands on them more
concretely.
This reflects the names used in the new E2EE notifications API.
The new post-E2EE versions will diverge from the pre-E2EE forms in
enough ways that this will become cleaner than our usual approach
of expressing the old forms as modifications of the new.
This should be NFC in the live app: it doesn't change the parsing,
only the toJson methods, and we never use those methods on these
types outside of tests.  (That's because in the live app we only
ever consume these objects, not send them.)
We already ignore these fields in any case, which is why this
doesn't require any changes outside the tests.
We don't actually consult this field when parsing, which is why
this doesn't require any changes outside the tests.
…format complete!

With this change, our test fixtures are now fully updated to reflect the
documented new form of these payloads.
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Jan 13, 2026
@gnprice
Copy link
Member Author

gnprice commented Jan 13, 2026

@rajveermalviya Would you include a round of manual testing that notifications still work correctly with this PR?

I think our tests should be thorough enough to catch any breakage there. But this is a high-value area of the app, and this PR makes a lot of changes to it, so it's worth us spending a bit of time to make extra sure.

Copy link
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gnprice! LGTM, and everything is working great when doing a round of manual tests of notifications on Android for 1-1 DMs, group DMs and channel messages across multiple realms.

@gnprice
Copy link
Member Author

gnprice commented Jan 14, 2026

Great, thanks for that testing! Merging.

@gnprice gnprice merged commit df7e292 into zulip:main Jan 14, 2026
1 check passed
@gnprice gnprice deleted the pr-e2een-parse branch January 14, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer review PR ready for review by Zulip maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants