Normalize send-path error handling

Receive and handle an array of errors in both the group and individual
cases.
This commit is contained in:
lilia 2014-12-22 15:09:49 -08:00
parent 80993753de
commit 8ed73d0ce5
2 changed files with 12 additions and 6 deletions

View file

@ -238,7 +238,7 @@ window.textsecure.messaging = function() {
return new Promise(function(resolve, reject) {
sendMessageProto(timestamp, [number], proto, function(res) {
if (res.failure.length > 0)
reject(res.failure[0].error);
reject(res.failure);
else
resolve();
});