From 19dfa83e4a0a06f53c66718753414293097d618b Mon Sep 17 00:00:00 2001 From: ThomasSession Date: Mon, 14 Oct 2024 16:22:29 +1100 Subject: [PATCH] More control messages check --- .../securesms/conversation/v2/ConversationViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt index a16695d5d2..316aeec86c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationViewModel.kt @@ -241,7 +241,7 @@ class ConversationViewModel( // hashes are required if wanting to delete messages from the 'storage server' // They are not required for communities OR if all messages are outgoing // also we can only delete deleted messages (marked as deleted) locally - val canDeleteForEveryone = messages.all{ !it.isDeleted } && ( + val canDeleteForEveryone = messages.all{ !it.isDeleted && !it.isControlMessage } && ( messages.all { it.isOutgoing } || conversationType == MessageType.COMMUNITY || messages.all { lokiMessageDb.getMessageServerHash(it.id, it.isMms) != null