didSendToEveryone: Handle situations where you didn't send to yourself

This commit is contained in:
Scott Nonnenberg
2025-03-20 01:06:08 +10:00
committed by GitHub
parent 66041da6a5
commit c3cc0a74c5

View File

@@ -1226,6 +1226,10 @@ function didSendToEveryone({
prop: 'sendStateByConversationId',
targetTimestamp,
}) || {};
const ourConversationId =
window.ConversationController.getOurConversationIdOrThrow();
const areWePrimaryDevice = window.ConversationController.areWePrimaryDevice();
return Object.entries(sendStateByConversationId).every(
([conversationId, sendState]) => {
const conversation = window.ConversationController.get(conversationId);
@@ -1238,6 +1242,10 @@ function didSendToEveryone({
}
}
if (conversationId === ourConversationId && areWePrimaryDevice) {
return true;
}
return isSent(sendState.status);
}
);