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
F3519347: D13735.id45262.diff
Sun, Dec 22, 9:54 PM
F3519345: D13735.id45237.diff
Sun, Dec 22, 9:54 PM
F3519338: D13735.id.diff
Sun, Dec 22, 9:54 PM
F3519337: D13735.diff
Sun, Dec 22, 9:54 PM
Unknown Object (File)
Sat, Nov 30, 7:59 AM
Unknown Object (File)
Nov 20 2024, 8:56 AM
Unknown Object (File)
Nov 20 2024, 8:55 AM
Unknown Object (File)
Nov 18 2024, 11:24 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