didSendToEveryone: Handle situations where you didn't send to yourself
This commit is contained in:
@@ -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);
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user