Page MenuHomePhabricator

[lib] Don't show Farcaster prompt for users after they unlink Farcaster
ClosedPublic

Authored by ashoat on Oct 16 2024, 8:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 11:58 PM
Unknown Object (File)
Sun, Nov 10, 12:38 PM
Unknown Object (File)
Fri, Nov 8, 5:27 AM
Unknown Object (File)
Thu, Nov 7, 10:51 PM
Unknown Object (File)
Fri, Nov 1, 2:03 AM
Unknown Object (File)
Fri, Nov 1, 1:45 AM
Unknown Object (File)
Thu, Oct 31, 6:31 AM
Unknown Object (File)
Wed, Oct 30, 12:53 PM
Subscribers

Details

Summary

If the user unlinks their Farcaster identity, we should set it to NO_FID_METADATA so they don't get prompted again.

Test Plan

I looked through the code for places that call useCurrentUserFID to see where undefined/null is differentiated. I saw that ConnectFarcasterAlertHandler calls shouldSkipConnectFarcasterAlert, which differentiates the two. I confirmed that setting NO_FID_METADATA is better, so that we return null and so that ConnectFarcasterAlertHandler doesn't prompt the user to connect their Farcaster account in this case

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/utils/farcaster-utils.js
26 ↗(On Diff #45237)

See here for the significance of setting NO_FID_METADATA instead of wiping the entry. We'll return null here instead of undefined

This revision is now accepted and ready to land.Oct 16 2024, 10:38 PM