Dont send group-update right before we quit the group

Fixes #166
This commit is contained in:
Matt Corallo 2015-02-25 12:28:49 -08:00
parent fd30dc6f1a
commit 9c3f8a1868
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -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) {