From 053bf20185133ace57a469ab1c7d42225172a888 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 8 Feb 2017 16:52:37 -0800 Subject: [PATCH] Group updates never have body or attachments Why would they? And group.added isn't used anywhere else. // FREEBIE --- js/libtextsecure.js | 15 +++------------ libtextsecure/message_receiver.js | 15 +++------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 289b2d6d4..9c247dbfa 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38513,20 +38513,11 @@ MessageReceiver.prototype.extend({ switch(decrypted.group.type) { case textsecure.protobuf.GroupContext.Type.UPDATE: + decrypted.body = null; + decrypted.attachments = []; return textsecure.storage.groups.updateNumbers( decrypted.group.id, decrypted.group.members - ).then(function(added) { - decrypted.group.added = added; - - if (decrypted.group.avatar === null && - decrypted.group.added.length == 0 && - decrypted.group.name === null) { - return; - } - - decrypted.body = null; - decrypted.attachments = []; - }); + ); break; case textsecure.protobuf.GroupContext.Type.QUIT: diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 58307e471..40a2fa77c 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -436,20 +436,11 @@ MessageReceiver.prototype.extend({ switch(decrypted.group.type) { case textsecure.protobuf.GroupContext.Type.UPDATE: + decrypted.body = null; + decrypted.attachments = []; return textsecure.storage.groups.updateNumbers( decrypted.group.id, decrypted.group.members - ).then(function(added) { - decrypted.group.added = added; - - if (decrypted.group.avatar === null && - decrypted.group.added.length == 0 && - decrypted.group.name === null) { - return; - } - - decrypted.body = null; - decrypted.attachments = []; - }); + ); break; case textsecure.protobuf.GroupContext.Type.QUIT: