Don't throw on duplicate members in a group update
Fixes #364 // FREEBIE
This commit is contained in:
parent
1aee065c2c
commit
0fa1069a93
2 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue