diff --git a/js/libtextsecure.js b/js/libtextsecure.js index ddf023c56..bf44b3413 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38258,7 +38258,7 @@ axolotlInternal.RecipientRecord = function() { var added = numbers.filter(function(number) { return group.numbers.indexOf(number) < 0; }); return textsecure.storage.groups.addNumbers(groupId, added).then(function(newGroup) { - if (newGroup.length != numbers.length || + if (numbers.filter(function(number) { return newGroup.indexOf(number) < 0; }).length != 0 || newGroup.filter(function(number) { return numbers.indexOf(number) < 0; }).length != 0) { throw new Error("Error calculating group member difference"); } diff --git a/libtextsecure/storage/groups.js b/libtextsecure/storage/groups.js index 90154a0fd..959966a93 100644 --- a/libtextsecure/storage/groups.js +++ b/libtextsecure/storage/groups.js @@ -145,7 +145,7 @@ var added = numbers.filter(function(number) { return group.numbers.indexOf(number) < 0; }); return textsecure.storage.groups.addNumbers(groupId, added).then(function(newGroup) { - if (newGroup.length != numbers.length || + if (numbers.filter(function(number) { return newGroup.indexOf(number) < 0; }).length != 0 || newGroup.filter(function(number) { return numbers.indexOf(number) < 0; }).length != 0) { throw new Error("Error calculating group member difference"); }