Skip to content

Commit

Permalink
[lib] Add support to useUpdateRelationships for sending relationship …
Browse files Browse the repository at this point in the history
…robotext to thick threads

Summary:
This diff addresses [ENG-9330](https://linear.app/comm/issue/ENG-9330/fork-membership-actions-for-thick-threads).

Some complexity was necessary to allow us to fetch device lists for the new user prior to sending the message. More context on that complexity in [this comment](https://linear.app/comm/issue/ENG-9269/relationship-buttons-result-in-a-thin-thread-being-created#comment-fcf306b6).

Depends on D13441

Test Plan: I tested all three cases of `RobotextPlanForUser`. I tested on both iOS and Android, with two clients talking to each other. I sent a friend request, accepted it, then removed the relationship and did the flow again.

Reviewers: tomek, kamil

Reviewed By: tomek

Subscribers: kamil

Differential Revision: https://phab.comm.dev/D13443
  • Loading branch information
Ashoat committed Sep 24, 2024
1 parent bf4c664 commit c93f6bc
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 14 deletions.
3 changes: 3 additions & 0 deletions keyserver/src/updaters/relationship-updaters.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ async function createPersonalThreads(
request: RelationshipRequest,
userIDs: $ReadOnlyArray<string>,
) {
// If you add another RelationshipAction to the supported list below, you'll
// probably want to add it to the FRIEND / FARCASTER_MUTUAL special cases in
// useUpdateRelationships as well
invariant(
request.action === relationshipActions.FRIEND ||
request.action === relationshipActions.FARCASTER_MUTUAL,
Expand Down
Loading

0 comments on commit c93f6bc

Please sign in to comment.