Page MenuHomePhabricator

[keyserver] Send farcaster_mutual UPDATE_RELATIONSHIP message when establishing Farcaster relationship
ClosedPublic

Authored by ashoat on Apr 21 2024, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 6:36 AM
Unknown Object (File)
Thu, Nov 21, 10:48 PM
Unknown Object (File)
Wed, Nov 20, 10:34 PM
Unknown Object (File)
Wed, Nov 20, 1:22 PM
Unknown Object (File)
Wed, Nov 20, 4:08 AM
Unknown Object (File)
Tue, Nov 19, 6:14 PM
Unknown Object (File)
Fri, Nov 8, 10:35 PM
Unknown Object (File)
Fri, Nov 8, 1:41 PM
Subscribers

Details

Summary

This is developed from my Hackathon commit 7024301fcda748efefa900bd952cd8e127aac87d, but updated to reflect changes @atul has made to allow us to include FID:

  1. Updates to the structure of the UPDATE_RELATIONSHIP message
  2. Updates to the FARCASTER_MUTUAL API

Note that I also updated the code to avoid creating KNOW_OF relationships between the viewer and themselves.

Test Plan

I tested this during the Hackathon, but haven't tested the updates since then. Will try to test this in the office this week

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Change looks good, but we should probably land something like D11712 first so web/desktop clients receive shimmed UNSUPPORTED messages?

This revision is now accepted and ready to land.Apr 22 2024, 10:16 AM

Makes sense – I'll defer landing this

I haven't landed this yet because I'm having trouble testing it while tethering and don't have access to Wi-Fi right now. Will hopefully find some Wi-Fi tomorrow

Finally got to testing this and found some issues:

  1. The list of userIDs passed to createPersonalThreads is not filtered through fetchUserInfos, which can lead to validateCandidateMembers throwing when createThread is called. This issue was present with relationshipActions.FRIEND as well. I addressed it by adding a third parameter to createPersonalThreads that passes in the filtered list of userIDs.
  2. We weren't filtering the viewer out before calling createPersonalThreads. (This one wasn't affecting relationshipActions.FRIEND; it's specific to relationshipActions.FARCASTER_MUTUAL.)
  3. We aren't specifying dontPrefixCreator when shimming UPDATE_RELATIONSHIP messages. Will address in a separate diff.
This revision was landed with ongoing or failed builds.May 3 2024, 1:41 PM
This revision was automatically updated to reflect the committed changes.
  1. We aren't specifying dontPrefixCreator when shimming UPDATE_RELATIONSHIP messages. Will address in a separate diff.

Addressed in D11868