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 @@ -851,7 +851,30 @@ ); } else if ( action.type === logOutActionTypes.success || - action.type === deleteKeyserverAccountActionTypes.success || + action.type === deleteKeyserverAccountActionTypes.success + ) { + const { messageStoreOperations, messageStore: filteredMessageStore } = + updateMessageStoreWithLatestThreadInfos(messageStore, newThreadInfos); + + const processedMessageStore = processMessageStoreOperations( + messageStore, + messageStoreOperations, + ); + + const currentAsOf = _omit(action.payload.keyserverIDs)( + filteredMessageStore.currentAsOf, + ); + + return { + messageStoreOperations, + messageStore: { + ...filteredMessageStore, + currentAsOf, + messages: processedMessageStore.messages, + threads: processedMessageStore.threads, + }, + }; + } else if ( action.type === deleteThreadActionTypes.success || action.type === leaveThreadActionTypes.success || action.type === setNewSessionActionType