Don't throw on duplicate members in a group update
Fixes #364 // FREEBIE
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user