From baaa3514d494f9da78948994e5eeef38a0b2b5d7 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 12 Nov 2014 12:28:11 -0800 Subject: [PATCH] Fix delivery receipts in group messages. Fixes #2056 Fixes #2067 Fixes #2087 --- .../securesms/database/model/MediaMmsMessageRecord.java | 2 +- src/org/thoughtcrime/securesms/sms/MessageSender.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java b/src/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java index 070d530c66..d1e5cdeec1 100644 --- a/src/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java +++ b/src/org/thoughtcrime/securesms/database/model/MediaMmsMessageRecord.java @@ -55,7 +55,7 @@ public class MediaMmsMessageRecord extends MessageRecord { int partCount, long mailbox) { super(context, id, body, recipients, individualRecipient, recipientDeviceId, - dateSent, dateReceived, threadId, deliveredCount, DELIVERY_STATUS_NONE, mailbox); + dateSent, dateReceived, threadId, DELIVERY_STATUS_NONE, deliveredCount, mailbox); this.context = context.getApplicationContext(); this.partCount = partCount; diff --git a/src/org/thoughtcrime/securesms/sms/MessageSender.java b/src/org/thoughtcrime/securesms/sms/MessageSender.java index 61b8e9e47d..1ad0abc25a 100644 --- a/src/org/thoughtcrime/securesms/sms/MessageSender.java +++ b/src/org/thoughtcrime/securesms/sms/MessageSender.java @@ -255,6 +255,10 @@ public class MessageSender { return false; } + if (recipients.isGroupRecipient()) { + return false; + } + String e164number = Util.canonicalizeNumber(context, recipients.getPrimaryRecipient().getNumber()); return TextSecurePreferences.getLocalNumber(context).equals(e164number); } catch (InvalidNumberException e) {