From c4a346341694a9e99eac82125153dadee7967a5a Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Tue, 17 Aug 2021 12:17:40 +1000 Subject: [PATCH] send unsend request to self only for delete locally --- .../securesms/conversation/v2/ConversationActivityV2.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index bff0a21213..0d37e0ac54 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -1138,7 +1138,9 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe private fun deleteLocally(message: MessageRecord) { buildUsendRequest(message)?.let { unsendRequest -> - MessageSender.send(unsendRequest, thread.address) + TextSecurePreferences.getLocalNumber(this)?.let { + MessageSender.send(unsendRequest, Address.fromSerialized(it)) + } } MessagingModuleConfiguration.shared.messageDataProvider.deleteMessage(message.id, !message.isMms) }