Page MenuHomePhabricator

D10589.id35606.diff
No OneTemporary

D10589.id35606.diff

diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js
--- a/lib/reducers/message-reducer.js
+++ b/lib/reducers/message-reducer.js
@@ -47,6 +47,8 @@
} from '../actions/thread-actions.js';
import { updateMultimediaMessageMediaActionType } from '../actions/upload-actions.js';
import {
+ keyserverAuthActionTypes,
+ tempIdentityLoginActionTypes,
logOutActionTypes,
deleteKeyserverAccountActionTypes,
logInActionTypes,
@@ -101,6 +103,7 @@
processUpdatesActionType,
} from '../types/update-types.js';
import { translateClientDBThreadMessageInfos } from '../utils/message-ops-utils.js';
+import { ashoatKeyserverID } from '../utils/validation-utils.js';
const _mapValuesWithKeys = _mapValues.convert({ cap: false });
@@ -745,6 +748,31 @@
threads: processedMessageStore.threads,
},
};
+ } else if (action.type === tempIdentityLoginActionTypes.success) {
+ const { messageStoreOperations, messageStore: freshStore } =
+ freshMessageStore([], {}, { [ashoatKeyserverID]: 0 }, newThreadInfos);
+
+ const processedMessageStore = processMessageStoreOperations(
+ messageStore,
+ messageStoreOperations,
+ );
+
+ return {
+ messageStoreOperations,
+ messageStore: {
+ ...freshStore,
+ messages: processedMessageStore.messages,
+ threads: processedMessageStore.threads,
+ },
+ };
+ } else if (action.type === keyserverAuthActionTypes.success) {
+ const { messagesResult } = action.payload;
+ return mergeNewMessages(
+ messageStore,
+ messagesResult.messageInfos,
+ messagesResult.truncationStatus,
+ newThreadInfos,
+ );
} else if (action.type === incrementalStateSyncActionType) {
if (
action.payload.messagesResult.rawMessageInfos.length === 0 &&

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 4:12 PM (18 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2431344
Default Alt Text
D10589.id35606.diff (1 KB)

Event Timeline