HomePhabricator
Diffusion Comm dec6602b77a8

[lib] Handle ops in the reducer

Description

[lib] Handle ops in the reducer

Summary:
Allow the reducer to return operations.

https://linear.app/comm/issue/ENG-10331/modify-the-reducer-to-support-the-db-operations

Depends on D14452

Test Plan:
Tested the whole stack on both native and web:

  1. Run the app on Redux version 86 with a modification to processDMOperation making all the INBOUND messages unsupported
  2. On one platform created a thread and sent a text message. These were visible on the sender, and invisible on the recipient
  3. Closed the recipient and added a migration that unshimms the thread creation operations, e.g.
unshimDMOperations(
  state,
  dmOperationTypes.CREATE_THREAD,
  handleReduxMigrationFailure,
): MigrationFunction<WebNavInfo, AppState>),
  1. Run the recipient and noticed the thread appearing
  2. Added another migration, this time unshimming text messages
  3. Run the recipient and noticed messages appearing

Reviewers: kamil, bartek

Reviewed By: kamil

Subscribers: ashoat

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

Details

Provenance
tomekAuthored on Fri, Mar 14, 6:28 AM
Reviewer
kamil
Differential Revision
D14453: [lib] Handle ops in the reducer
Parents
rCOMM413e95d152c6: [lib] Convert the operations
Branches
Loading...
Tags
Loading...