Page MenuHomePhabricator

D13453.diff
No OneTemporary

D13453.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
Sun, Dec 22, 10:51 AM (12 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690792
Default Alt Text
D13453.diff (1 KB)

Event Timeline