Page MenuHomePhabricator

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

Authored by atul on Apr 9 2024, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 9:57 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
Unknown Object (File)
Oct 13 2024, 12:24 AM
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
Branch
arcpatch-D11607_1 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Apr 9 2024, 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.Apr 10 2024, 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.Apr 17 2024, 12:10 PM
This revision was automatically updated to reflect the committed changes.