mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-09-02 03:11:58 +01:00
Fix DoE received in terminated groups to match UI behavior
This commit is contained in:
@@ -29,7 +29,7 @@ export type DeleteForEveryoneMessage = Pick<
|
||||
|
||||
export type DeleteForEveryoneConversation = Pick<
|
||||
ConversationAttributesType,
|
||||
'id' | 'e164' | 'serviceId' | 'groupId' | 'groupVersion'
|
||||
'id' | 'e164' | 'serviceId' | 'groupId' | 'groupVersion' | 'terminated'
|
||||
>;
|
||||
|
||||
type Result<T extends object = Record<never, never>> =
|
||||
@@ -47,6 +47,9 @@ function checkCommon(
|
||||
if (isMe(targetConversation)) {
|
||||
return { ok: false, reason: 'note to self conversation' };
|
||||
}
|
||||
if (targetConversation.terminated) {
|
||||
return { ok: false, reason: 'terminated conversation' };
|
||||
}
|
||||
if (!options?.allowAlreadyDeleted && targetMessage.deletedForEveryone) {
|
||||
return { ok: false, reason: 'already deleted' };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user