diff --git a/js/models/messages.js b/js/models/messages.js index 049c57486..8c118df8a 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -711,13 +711,23 @@ this.set({ errors }); const profileKey = null; - const numbers = retries.map(retry => retry.number); + let numbers = retries + .map(retry => retry.number) + .filter(item => Boolean(item)); if (!numbers.length) { - window.log.error( - 'retrySend: Attempted to retry, but no numbers to send to!' + window.log.warn( + '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( diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 1b6ee39c1..e5187d82c 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -207,7 +207,7 @@ "rule": "jQuery-wrap(", "path": "js/models/messages.js", "line": " this.send(wrap(promise));", - "lineNumber": 810, + "lineNumber": 820, "reasonCategory": "falseMatch", "updated": "2018-10-05T23:12:28.961Z" }, @@ -215,7 +215,7 @@ "rule": "jQuery-wrap(", "path": "js/models/messages.js", "line": " return wrap(", - "lineNumber": 1019, + "lineNumber": 1029, "reasonCategory": "falseMatch", "updated": "2018-10-05T23:12:28.961Z" },