Page MenuHomePhabricator

[lib] Split add members spec
ClosedPublic

Authored by tomek on Aug 12 2024, 7:21 AM.
Tags
None
Referenced Files
F2763864: D13052.id43518.diff
Thu, Sep 19, 11:47 AM
F2763513: D13052.id43312.diff
Thu, Sep 19, 11:31 AM
F2763504: D13052.id43455.diff
Thu, Sep 19, 11:28 AM
F2756701: D13052.diff
Thu, Sep 19, 1:02 AM
Unknown Object (File)
Tue, Sep 17, 1:52 AM
Unknown Object (File)
Mon, Sep 16, 3:18 AM
Unknown Object (File)
Sun, Sep 15, 9:07 AM
Unknown Object (File)
Sun, Sep 15, 9:06 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

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

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.