diff --git a/lib/utils/farcaster-utils.js b/lib/utils/farcaster-utils.js --- a/lib/utils/farcaster-utils.js +++ b/lib/utils/farcaster-utils.js @@ -12,6 +12,7 @@ import { useSelector, useDispatch } from '../utils/redux-utils.js'; const DISABLE_CONNECT_FARCASTER_ALERT = true; +const NO_FID_METADATA = 'NONE'; function useCurrentUserFID(): ?string { return useSelector( @@ -70,6 +71,7 @@ export { DISABLE_CONNECT_FARCASTER_ALERT, + NO_FID_METADATA, useCurrentUserFID, useLinkFID, useUnlinkFID, diff --git a/lib/utils/push-alerts.js b/lib/utils/push-alerts.js --- a/lib/utils/push-alerts.js +++ b/lib/utils/push-alerts.js @@ -20,11 +20,7 @@ function shouldSkipConnectFarcasterAlert(alertInfo: AlertInfo): boolean { // The isDev check is here so that devs don't get continually spammed // with this alert. - return ( - isDev || - DISABLE_CONNECT_FARCASTER_ALERT || - alertInfo.lastAlertTime > Date.now() - msInDay - ); + return isDev || DISABLE_CONNECT_FARCASTER_ALERT || alertInfo.totalAlerts > 0; } function shouldSkipCreateSIWEBackupMessageAlert(alertInfo: AlertInfo): boolean { diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js --- a/native/account/registration/registration-server-call.js +++ b/native/account/registration/registration-server-call.js @@ -23,6 +23,7 @@ } from 'lib/types/account-types.js'; import { syncedMetadataNames } from 'lib/types/synced-metadata-types.js'; import { getMessageForException } from 'lib/utils/errors.js'; +import { NO_FID_METADATA } from 'lib/utils/farcaster-utils.js'; import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js'; import { useDispatch } from 'lib/utils/redux-utils.js'; import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js'; @@ -364,6 +365,14 @@ data: farcasterID, }, }); + } else { + dispatch({ + type: setSyncedMetadataEntryActionType, + payload: { + name: syncedMetadataNames.CURRENT_USER_FID, + data: NO_FID_METADATA, + }, + }); } if (siweBackupSecrets) { await commCoreModule.setSIWEBackupSecrets(siweBackupSecrets);