mark conversation as secondary on message synced when needed

pull/1273/head
Audric Ackermann 4 years ago
parent d943a9401b
commit dd3080d9fe
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -32,7 +32,7 @@ window.Signal = {
Components: {
SessionPasswordPrompt,
},
}
};
window.CONSTANTS = {
MAX_LOGIN_TRIES: 3,

@ -631,7 +631,20 @@ export async function handleMessageEvent(event: MessageEvent): Promise<void> {
);
}
await window.ConversationController.getOrCreateAndWait(conversationId, type);
const conv = await window.ConversationController.getOrCreateAndWait(
conversationId,
type
);
if (!isGroupMessage && !isIncoming) {
const primaryDestination = await MultiDeviceProtocol.getPrimaryDevice(
destination
);
if (destination !== primaryDestination.key) {
// mark created conversation as secondary if this is one
conv.setSecondaryStatus(true, primaryDestination.key);
}
}
// =========== Process flags =============

Loading…
Cancel
Save