didSendToEveryone: Handle situations where you didn't send to yourself
This commit is contained in:
@@ -1226,6 +1226,10 @@ function didSendToEveryone({
|
|||||||
prop: 'sendStateByConversationId',
|
prop: 'sendStateByConversationId',
|
||||||
targetTimestamp,
|
targetTimestamp,
|
||||||
}) || {};
|
}) || {};
|
||||||
|
const ourConversationId =
|
||||||
|
window.ConversationController.getOurConversationIdOrThrow();
|
||||||
|
const areWePrimaryDevice = window.ConversationController.areWePrimaryDevice();
|
||||||
|
|
||||||
return Object.entries(sendStateByConversationId).every(
|
return Object.entries(sendStateByConversationId).every(
|
||||||
([conversationId, sendState]) => {
|
([conversationId, sendState]) => {
|
||||||
const conversation = window.ConversationController.get(conversationId);
|
const conversation = window.ConversationController.get(conversationId);
|
||||||
@@ -1238,6 +1242,10 @@ function didSendToEveryone({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conversationId === ourConversationId && areWePrimaryDevice) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return isSent(sendState.status);
|
return isSent(sendState.status);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user