HomePhabricator
Diffusion Comm 765101b84d5c

[lib] Update the replies count

Description

[lib] Update the replies count

Summary:

  1. Get all the updated threads from the updates.
  2. Group the threads and get the most recent one - some specs can generate multiple thread updates, and we want to have the thread from the last update, because this thread is the most recent and will end up being put into Redux and DB.
  3. Count the messages.
  4. Generate a new update with an updated thread by increasing its replies count.

https://linear.app/comm/issue/ENG-8930/unify-the-approach-to-replies-count-and-unread-status-updates

Depends on D13058

Test Plan: Tested change thread setting and send text message operations. Verified that only send text message operation bums the replies count.

Reviewers: kamil, inka

Reviewed By: inka

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13059

Details

Provenance
tomekAuthored on Aug 13 2024, 4:53 AM
Reviewer
inka
Differential Revision
D13059: [lib] Update the replies count
Parents
rCOMM26695fb50339: [lib] Delete old replies count logic
Branches
Unknown
Tags
Unknown