Page MenuHomePhabricator

[lib] Check the timestamps when leaving a thread
ClosedPublic

Authored by tomek on Sep 2 2024, 8:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 3:57 PM
Unknown Object (File)
Wed, Dec 18, 3:57 PM
Unknown Object (File)
Wed, Dec 18, 3:57 PM
Unknown Object (File)
Wed, Dec 18, 3:57 PM
Unknown Object (File)
Wed, Dec 18, 3:57 PM
Unknown Object (File)
Thu, Nov 28, 2:05 PM
Unknown Object (File)
Thu, Nov 28, 1:15 PM
Unknown Object (File)
Nov 24 2024, 11:49 PM
Subscribers

Details

Summary

Only remove the editor when the operation is more recent than the timestamp.

https://linear.app/comm/issue/ENG-9116/update-leavethreadspec

Depends on D13219

Test Plan

Create a thread, add some members, and remove some. Check if the timestamps behave correctly, and the membership is correct.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Sep 2 2024, 9:09 AM
inka requested changes to this revision.Sep 3 2024, 4:15 AM
inka added inline comments.
lib/shared/dm-ops/leave-thread-spec.js
73 ↗(On Diff #43834)

We seem to prioritise removing a user over adding a user. I would do it the other way around because it's easier to remove someone than it is to add them, but up to you.

74–77 ↗(On Diff #43834)

We are updating the timestamp even if isMember > time. Should we early return here like in previous diffs?

This revision now requires changes to proceed.Sep 3 2024, 4:15 AM

Fix the timestamp condition

This revision is now accepted and ready to land.Sep 6 2024, 5:05 AM
This revision was landed with ongoing or failed builds.Sep 6 2024, 8:10 AM
This revision was automatically updated to reflect the committed changes.