Page MenuHomePhabricator

[lib] Reduce new PROCESS_DM_OPS action
ClosedPublic

Authored by ashoat on Jul 16 2024, 8:18 PM.
Tags
None
Referenced Files
F3386787: D12781.diff
Fri, Nov 29, 6:14 AM
Unknown Object (File)
Thu, Nov 7, 3:58 PM
Unknown Object (File)
Oct 23 2024, 6:06 AM
Unknown Object (File)
Oct 22 2024, 10:45 AM
Unknown Object (File)
Oct 22 2024, 10:45 AM
Unknown Object (File)
Oct 22 2024, 10:19 AM
Unknown Object (File)
Oct 22 2024, 10:19 AM
Unknown Object (File)
Oct 9 2024, 6:16 AM
Subscribers

Details

Summary

I compiled a list of reducers I should update by searching for existing reducers of PROCESS_MESSAGES and PROCESS_UPDATES. The former is only reduced in message-reducer.js, while the latter is reduced in all of the below reducers.

I excluded three reducers that currently reduce PROCESS_UPDATES:

  1. reduceKeyserverStore, which keeps track of updatesCurrentAsOf for keyserver updates. We're using a different mechanism to verify and track DM ops.
  2. reduceCurrentUserInfo, which should not be possible to affect with DM ops.
  3. reduceUserInfos, which should not be possible to affect with DM ops. The UserInfosHandler should handle populating the UserStore when new users are encountered via DM ops. Tracking this in a new task: ENG-8829.

Submitting this now so @tomek can see the code, as his work relates to this code.

Depends on D12780

Test Plan

Test plan described here

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/reducers/message-reducer.js
1827

By leaving truncationStatuses empty, we're saying that the truncation status should be UNCHANGED for all of the threads

lib/reducers/message-reducer.js
1827

Note that this third parameter is for the rawMessageInfos, but the updateInfos can have their own RawMessageInfos with their own truncationStatuses (see D12828)

While we might want MessageTruncationStatuses other than UNCHANGED for the RawMessageInfos that come with the updateInfos, we'll always want UNCHANGED for the rawMessageInfos that aren't associated with updateInfos

This revision is now accepted and ready to land.Jul 22 2024, 1:57 AM
This revision was automatically updated to reflect the committed changes.