diff --git a/js/libtextsecure.js b/js/libtextsecure.js index bf44b341..a079605f 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -38249,7 +38249,7 @@ axolotlInternal.RecipientRecord = function() { if (group === undefined) throw new Error("Tried to update numbers for unknown group"); - if (numbers.filter(function(number) { return !textsecure.utils.isNumberSane(number); }).length > 0) + if (numbers.filter(textsecure.utils.isNumberSane).length < numbers.length) throw new Error("Invalid number in new group members"); if (group.numbers.filter(function(number) { return numbers.indexOf(number) < 0 }).length > 0) diff --git a/libtextsecure/storage/groups.js b/libtextsecure/storage/groups.js index 959966a9..50c70ede 100644 --- a/libtextsecure/storage/groups.js +++ b/libtextsecure/storage/groups.js @@ -136,7 +136,7 @@ if (group === undefined) throw new Error("Tried to update numbers for unknown group"); - if (numbers.filter(function(number) { return !textsecure.utils.isNumberSane(number); }).length > 0) + if (numbers.filter(textsecure.utils.isNumberSane).length < numbers.length) throw new Error("Invalid number in new group members"); if (group.numbers.filter(function(number) { return numbers.indexOf(number) < 0 }).length > 0)