Fail over to all numbers in retry if errors don't have numbers
This commit is contained in:
parent
92c071e083
commit
1533fcc807
2 changed files with 16 additions and 6 deletions
|
@ -711,13 +711,23 @@
|
||||||
this.set({ errors });
|
this.set({ errors });
|
||||||
|
|
||||||
const profileKey = null;
|
const profileKey = null;
|
||||||
const numbers = retries.map(retry => retry.number);
|
let numbers = retries
|
||||||
|
.map(retry => retry.number)
|
||||||
|
.filter(item => Boolean(item));
|
||||||
|
|
||||||
if (!numbers.length) {
|
if (!numbers.length) {
|
||||||
window.log.error(
|
window.log.warn(
|
||||||
'retrySend: Attempted to retry, but no numbers to send to!'
|
'retrySend: No numbers in error set, using all recipients'
|
||||||
);
|
);
|
||||||
return null;
|
const conversation = this.getConversation();
|
||||||
|
if (conversation) {
|
||||||
|
numbers = conversation.getRecipients();
|
||||||
|
this.set({ errors: null });
|
||||||
|
} else {
|
||||||
|
throw new Error(
|
||||||
|
'No numbers in error set, did not find conversation for message'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const attachmentsWithData = await Promise.all(
|
const attachmentsWithData = await Promise.all(
|
||||||
|
|
|
@ -207,7 +207,7 @@
|
||||||
"rule": "jQuery-wrap(",
|
"rule": "jQuery-wrap(",
|
||||||
"path": "js/models/messages.js",
|
"path": "js/models/messages.js",
|
||||||
"line": " this.send(wrap(promise));",
|
"line": " this.send(wrap(promise));",
|
||||||
"lineNumber": 810,
|
"lineNumber": 820,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2018-10-05T23:12:28.961Z"
|
"updated": "2018-10-05T23:12:28.961Z"
|
||||||
},
|
},
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
"rule": "jQuery-wrap(",
|
"rule": "jQuery-wrap(",
|
||||||
"path": "js/models/messages.js",
|
"path": "js/models/messages.js",
|
||||||
"line": " return wrap(",
|
"line": " return wrap(",
|
||||||
"lineNumber": 1019,
|
"lineNumber": 1029,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2018-10-05T23:12:28.961Z"
|
"updated": "2018-10-05T23:12:28.961Z"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue