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
F3361806: D13220.diff
Sun, Nov 24, 7:30 PM
Unknown Object (File)
Sat, Nov 9, 5:54 PM
Unknown Object (File)
Sat, Nov 9, 3:02 PM
Unknown Object (File)
Sat, Nov 9, 2:54 PM
Unknown Object (File)
Sat, Nov 9, 2:43 PM
Unknown Object (File)
Sat, Nov 9, 2:26 PM
Unknown Object (File)
Sat, Nov 9, 7:21 AM
Unknown Object (File)
Fri, Nov 8, 7:19 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.