Page MenuHomePhabricator

[keyserver] Update `createPersonalThreads` to support both `[Traditional/Farcaster]RelationshipRequest`
ClosedPublic

Authored by atul on Tue, Apr 9, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 3:23 PM
Unknown Object (File)
Fri, Apr 26, 12:18 PM
Unknown Object (File)
Mon, Apr 22, 6:31 PM
Unknown Object (File)
Sun, Apr 21, 6:13 PM
Unknown Object (File)
Sun, Apr 21, 3:26 PM
Unknown Object (File)
Sun, Apr 21, 1:47 PM
Unknown Object (File)
Wed, Apr 17, 4:53 PM
Unknown Object (File)
Tue, Apr 16, 3:27 PM
Subscribers

Details

Summary

Now that we may get userIDsToFID instead of userIDs, we need to transform back to list of userIDs via Object.keys to maintain existing behavior.


Depends on D11606

Test Plan
  1. Set breakpoints and add log statements to ensure that userIDs gets constructed as expected for both traditional and farcaster relationship requests.
  2. Check keyserverDB to ensure that threads are created as expected

(need to go through again before landing)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Tue, Apr 9, 9:38 PM
tomek added inline comments.
keyserver/src/updaters/relationship-updaters.js
337–339 ↗(On Diff #38966)

How about checking the type property?

This revision is now accepted and ready to land.Wed, Apr 10, 6:47 AM
keyserver/src/updaters/relationship-updaters.js
337–339 ↗(On Diff #38966)

Tried this initially, but flow wasn't able to figure out that FARCASTER_MUTUAL requests have userIDsToFID and the rest have userIDs

3cf86a.png (1×2 px, 656 KB)

This diff is safe to land as is as it broadens what arguments createPersonalThreads can accept and TraditionalRelationshipRequests will continue to work as expected.

This revision was landed with ongoing or failed builds.Wed, Apr 17, 12:10 PM
This revision was automatically updated to reflect the committed changes.