Page MenuHomePhabricator

[lib] Don't created thin thread if call to identity server failed when adding friends
ClosedPublic

Authored by angelika on Nov 22 2024, 1:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 11:17 PM
Unknown Object (File)
Fri, Dec 13, 11:16 PM
Unknown Object (File)
Mon, Dec 9, 7:00 AM
Unknown Object (File)
Tue, Dec 3, 3:19 AM
Unknown Object (File)
Mon, Dec 2, 3:07 AM
Unknown Object (File)
Sat, Nov 30, 2:39 AM
Unknown Object (File)
Sat, Nov 30, 1:45 AM
Unknown Object (File)
Fri, Nov 29, 6:07 PM
Subscribers

Details

Summary

https://linear.app/comm/issue/ENG-9509/accepting-a-friend-request-on-web-creates-thin-thread

Related discussion: https://phab.comm.dev/D13940#389316
Now we're throwing an error just in useUpdateRelationships(), there are no changes in getUserIdentities()
and useUsersSupportThickThreads() returns Map instead of Set

Depends on D14022

Test Plan

Throw some error in fetchUserIdentitiesPromise() so that finding user indentity always fails
Mobile user goes to profile -> Friend list and adds the web user as a friend
Before a thin thread was created. Now mobile user sees an alert, because there is no auxUserInfo, no thick thread and call to identity server fails.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat added inline comments.
lib/hooks/user-identities-hooks.js
10 ↗(On Diff #45975)

It looks like null is not possible... might be good to be more specific

This revision is now accepted and ready to land.Mon, Nov 25, 8:18 AM

Rebase and change type from ?boolean to boolean | void