Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle moved messages for unreads #1311

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

PIG208
Copy link
Member

@PIG208 PIG208 commented Jan 27, 2025

Work toward #901

I prioritized updating unreads data for moved messages because it is more visible after supporting the resolve/unresolve topic actions. Updating recent senders data will be a follow-up to this.

@PIG208 PIG208 force-pushed the pr-unreads branch 3 times, most recently from 72c791a to bb2c00d Compare January 28, 2025 23:09
…Event

While this says [nfc], there is actually a change: `toJson` no longer
includes these message move related fields.  However, this seems to have nearly
no impact on the tests, and clearly does not affect the app.

Signed-off-by: Zixuan James Li <[email protected]>
This moves some assertions so that we can make all fields
non-nullable, with reasonable fallback values.  As of writing, we do not
use origStreamId (a.k.a.: 'stream_id') when there was no message move,
even though it is present if there were content edits.  This makes
dropping 'stream_id' when parsing `moveData` into `null` acceptable for
now.

Signed-off-by: Zixuan James Li <[email protected]>
@PIG208 PIG208 marked this pull request as ready for review January 30, 2025 23:24
@PIG208 PIG208 added the maintainer review PR ready for review by Zulip maintainers label Jan 30, 2025
@PIG208 PIG208 requested a review from chrisbobbe January 30, 2025 23:24
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