Page MenuHomePhabricator

D13453.id44498.diff
No OneTemporary

D13453.id44498.diff

diff --git a/lib/reducers/aux-user-reducer.js b/lib/reducers/aux-user-reducer.js
--- a/lib/reducers/aux-user-reducer.js
+++ b/lib/reducers/aux-user-reducer.js
@@ -39,22 +39,27 @@
const replaceOperations: ReplaceAuxUserInfoOperation[] = [];
for (const userID in state.auxUserInfos) {
if (
- state.auxUserInfos[userID].fid !== null &&
- !toUpdateUserIDs.has(userID)
+ state.auxUserInfos[userID].fid === null ||
+ toUpdateUserIDs.has(userID)
) {
- replaceOperations.push({
- type: 'replace_aux_user_info',
- payload: {
- id: userID,
- auxUserInfo: {
- ...state.auxUserInfos[userID],
- fid: null,
- },
- },
- });
+ continue;
}
+ replaceOperations.push({
+ type: 'replace_aux_user_info',
+ payload: {
+ id: userID,
+ auxUserInfo: {
+ ...state.auxUserInfos[userID],
+ fid: null,
+ },
+ },
+ });
}
for (const farcasterUser of action.payload.farcasterUsers) {
+ const existingAuxUserInfo = state.auxUserInfos[farcasterUser.userID];
+ if (existingAuxUserInfo?.fid === farcasterUser.farcasterID) {
+ continue;
+ }
replaceOperations.push({
type: 'replace_aux_user_info',
payload: {

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 5:48 PM (20 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535402
Default Alt Text
D13453.id44498.diff (1 KB)

Event Timeline