Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3367009
D12683.id42094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12683.id42094.diff
View Options
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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 1:22 PM (13 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584874
Default Alt Text
D12683.id42094.diff (2 KB)
Attached To
Mode
D12683: [native] update connect farcaster prompt to be less annyoying
Attached
Detach File
Event Timeline
Log In to Comment