Page MenuHomePhabricator

[lib] Split add members spec
ClosedPublic

Authored by tomek on Aug 12 2024, 7:21 AM.
Tags
None
Referenced Files
F3383119: D13052.id43455.diff
Thu, Nov 28, 1:45 PM
F3383071: D13052.id43518.diff
Thu, Nov 28, 1:25 PM
F3382763: D13052.diff
Thu, Nov 28, 11:55 AM
Unknown Object (File)
Wed, Nov 20, 9:25 PM
Unknown Object (File)
Wed, Nov 20, 9:25 PM
Unknown Object (File)
Fri, Nov 8, 11:06 PM
Unknown Object (File)
Fri, Nov 8, 12:23 PM
Unknown Object (File)
Oct 22 2024, 1:16 PM
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.Aug 19 2024, 7:11 AM
This revision was automatically updated to reflect the committed changes.
tomek marked an inline comment as done.