From 9c3f8a1868fbc8248fe39b979fbe8c7dbb91c64d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 25 Feb 2015 12:28:49 -0800 Subject: [PATCH] Dont send group-update right before we quit the group Fixes #166 --- js/libtextsecure.js | 2 +- libtextsecure/sendmessage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 2f347c07..8b2d9c86 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -17020,7 +17020,7 @@ window.textsecure.messaging = function() { doSendMessage = function(number, devicesForNumber, recurse) { var groupUpdate = Promise.resolve(true); - if (message.group && message.group.id) + if (message.group && message.group.id && message.group.type != textsecure.protobuf.PushMessageContent.GroupContext.Type.QUIT) groupUpdate = refreshGroup(number, message.group.id, devicesForNumber); return groupUpdate.then(function() { return sendMessageToDevices(timestamp, number, devicesForNumber, message).then(function(result) { diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index c4628536..cd3c62a0 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -179,7 +179,7 @@ window.textsecure.messaging = function() { doSendMessage = function(number, devicesForNumber, recurse) { var groupUpdate = Promise.resolve(true); - if (message.group && message.group.id) + if (message.group && message.group.id && message.group.type != textsecure.protobuf.PushMessageContent.GroupContext.Type.QUIT) groupUpdate = refreshGroup(number, message.group.id, devicesForNumber); return groupUpdate.then(function() { return sendMessageToDevices(timestamp, number, devicesForNumber, message).then(function(result) {