Page MenuHomePhabricator

[lib] Split add members spec
ClosedPublic

Authored by tomek on Aug 12 2024, 7:21 AM.
Tags
None
Referenced Files
F2726315: D13052.id43518.diff
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
Unknown Object (File)
Mon, Sep 9, 4:38 PM
Unknown Object (File)
Mon, Sep 9, 3:18 PM
Unknown Object (File)
Fri, Sep 6, 12:44 PM
Unknown Object (File)
Fri, Sep 6, 5:36 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
Lint Not Applicable
Unit
Tests Not Applicable

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.Mon, Aug 19, 7:11 AM
This revision was automatically updated to reflect the committed changes.
tomek marked an inline comment as done.