Mark message sent iff at least 1 recipient got it
Previously, we would always mark a message sent even if all our network requests failed. Fix #484 // FREEBIE
This commit is contained in:
parent
7f60a2d797
commit
dabe51fd68
1 changed files with 1 additions and 1 deletions
|
@ -152,13 +152,13 @@
|
||||||
if (result.dataMessage) {
|
if (result.dataMessage) {
|
||||||
this.set({dataMessage: result.dataMessage});
|
this.set({dataMessage: result.dataMessage});
|
||||||
}
|
}
|
||||||
this.set({sent: true});
|
|
||||||
|
|
||||||
if (result instanceof Error) {
|
if (result instanceof Error) {
|
||||||
this.saveErrors(result);
|
this.saveErrors(result);
|
||||||
} else {
|
} else {
|
||||||
this.saveErrors(result.errors);
|
this.saveErrors(result.errors);
|
||||||
if (result.successfulNumbers.length > 0) {
|
if (result.successfulNumbers.length > 0) {
|
||||||
|
this.set({sent: true});
|
||||||
this.sendSyncMessage();
|
this.sendSyncMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue