mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
mark conversation as secondary on message synced when needed
This commit is contained in:
parent
d943a9401b
commit
dd3080d9fe
|
@ -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…
Reference in a new issue