MCPcopy Create free account
hub / github.com/CommE2E/comm / saveMessageInfos

Method saveMessageInfos

native/push/push-handler.react.js:680–698  ·  view source on GitHub ↗
(rawMessageInfos: ?$ReadOnlyArray<RawMessageInfo>)

Source from the content-addressed store, hash-verified

678 }
679
680 saveMessageInfos(rawMessageInfos: ?$ReadOnlyArray<RawMessageInfo>) {
681 if (!rawMessageInfos) {
682 return;
683 }
684
685 const keyserverIDToMessageInfos = _groupBy(messageInfos =>
686 extractKeyserverIDFromIDOptional(messageInfos.threadID),
687 )(rawMessageInfos);
688
689 for (const keyserverID in keyserverIDToMessageInfos) {
690 const updatesCurrentAsOf = this.props.allUpdatesCurrentAsOf[keyserverID];
691 const messageInfos = keyserverIDToMessageInfos[keyserverID];
692
693 this.props.dispatch({
694 type: saveMessagesActionType,
695 payload: { rawMessageInfos: messageInfos, updatesCurrentAsOf },
696 });
697 }
698 }
699
700 iosForegroundNotificationReceived = (
701 rawNotification: CoreIOSNotificationData,

Callers 1

PushHandlerClass · 0.95

Calls 1

Tested by

no test coverage detected