Fix group loop
All the group messages were being sent to the last recipient in the list, due to the persistence of `var number` in later loops and async calls. An easy mistake to make, when you use for instead of each.
This commit is contained in:
parent
1571868520
commit
cc5327dbc9
1 changed files with 2 additions and 3 deletions
|
@ -170,8 +170,7 @@ window.textsecure.messaging = function() {
|
|||
});
|
||||
}
|
||||
|
||||
for (var i = 0; i < numbers.length; i++) {
|
||||
var number = numbers[i];
|
||||
_.each(numbers, function(number) {
|
||||
var devicesForNumber = textsecure.storage.devices.getDeviceObjectsForNumber(number);
|
||||
|
||||
var promises = [];
|
||||
|
@ -191,7 +190,7 @@ window.textsecure.messaging = function() {
|
|||
} else
|
||||
doSendMessage(number, devicesForNumber, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
makeAttachmentPointer = function(attachment) {
|
||||
|
|
Loading…
Reference in a new issue