Page MenuHomePhabricator

[lib] Split add members spec
ClosedPublic

Authored by tomek on Aug 12 2024, 7:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 1:16 PM
Unknown Object (File)
Tue, Oct 22, 9:14 AM
Unknown Object (File)
Tue, Oct 22, 8:32 AM
Unknown Object (File)
Thu, Oct 17, 10:25 PM
Unknown Object (File)
Sep 25 2024, 4:12 PM
Unknown Object (File)
Sep 25 2024, 4:12 PM
Unknown Object (File)
Sep 19 2024, 11:47 AM
Unknown Object (File)
Sep 19 2024, 11:31 AM
Subscribers

Details

Summary

Split the spec so that we don't send extraneous data to all the existing members.

https://linear.app/comm/issue/ENG-8929/split-add-members-operation

Test Plan

Checked two scenarios:

  1. Viewer creates a thread and adds a new user to it using add_members operation
  2. Viewer is added to a thread using add_viewer_to_thread_members

In both cases the thread appeared in the store with correct membership array.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Aug 12 2024, 8:40 AM
lib/shared/dm-ops/add-viewer-to-thread-members-spec.js
93 ↗(On Diff #43312)

I don't think that's a correct reason?

Fix returned validation result

tomek added inline comments.
lib/shared/dm-ops/add-viewer-to-thread-members-spec.js
93 ↗(On Diff #43312)

Yes, you're right. I added a comment

// The operation is invalid when this condition is false

where I tried to explain this, but a better solution is to add another reason to the response. In the future, this should be handled by our validation.

This revision is now accepted and ready to land.Aug 19 2024, 7:11 AM
This revision was automatically updated to reflect the committed changes.
tomek marked an inline comment as done.