Page MenuHomePhabricator

Implement DMActivityHandler
ClosedPublic

Authored by marcin on Sep 5 2024, 6:15 AM.
Tags
None
Referenced Files
F3539292: D13246.id44000.diff
Thu, Dec 26, 12:31 AM
F3539285: D13246.id43895.diff
Thu, Dec 26, 12:28 AM
F3538794: D13246.id43896.diff
Wed, Dec 25, 11:56 PM
F3538790: D13246.id43998.diff
Wed, Dec 25, 11:52 PM
Unknown Object (File)
Wed, Dec 18, 7:01 AM
Unknown Object (File)
Wed, Dec 18, 7:01 AM
Unknown Object (File)
Wed, Dec 18, 7:01 AM
Unknown Object (File)
Wed, Dec 18, 7:01 AM
Subscribers

Details

Summary

This differential implements DMActivityHandler component. Its role is the same as ActivityHandler but it works thick threads. I opted for new compoment instead of modifying ActivityHandler since we only need one component for thick threads while there are many ActivityHandlers (one for each keyserver). Therefore I couldn't see an easy way to reuse ActivityHandler.

Test Plan
  1. Create thick thread between users A and B.
  2. Log in as user A on two devices (on web and on native) and log in as user B on third device.
  3. Send message from B to A. Open the thread as A on web. Ensure rescinding happens on native.
  4. Open the thread as A on native. Change opened thread as A on web. Send messages from B to A. Ensure that thread remains read on web.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-8944
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Remove unwanted change in version-utils.js

marcin requested review of this revision.Sep 5 2024, 6:34 AM
tomek added inline comments.
lib/handlers/dm-activity-handler.js
4–5 ↗(On Diff #43896)

Can be merged.

This revision is now accepted and ready to land.Sep 6 2024, 8:29 AM

Enable tracking update activity action for thick threads

This revision was landed with ongoing or failed builds.Sep 9 2024, 9:06 AM
This revision was automatically updated to reflect the committed changes.
lib/handlers/dm-activity-handler.js
92–95 ↗(On Diff #44000)

What's the point of this? Does processAndSendDMOperation already dispatch actions? Given you're returning empty collections on line 46, it seems like no reducers will have any changes as a result of these actions... so probably best to remove these lines.

@marcin, if this makes sense to you, can you remove these lines as part of the same stack as D13260, and land the fixes together?

native/components/dm-activity-handler.react.js
1 ↗(On Diff #44000)

Nit: we always have an extra newline after this

12–21 ↗(On Diff #44000)

Looks like most of this was copy-pasted from native/socket.react.js. Could you factor it out in a follow-up diff?

web/components/dm-activity-handler.react.js
1 ↗(On Diff #44000)

Same here

lib/handlers/dm-activity-handler.js
92–95 ↗(On Diff #44000)

I figured that we might want to task status of this action. This is the approach that we are already using in, for example, useChangeThreadSettings. If we are running for thick threads we return empty collections so that we can call it from dispatchActionPromise and track its status.

lib/handlers/dm-activity-handler.js
92–95 ↗(On Diff #44000)

Unless we have a reason for it (such as tracking loadingStatus), I think we should remove the dispatch

and track its status

Do we track the status of updateActivityActionTypes?