Fix check for successfull delivery

This commit is contained in:
Fedor Indutny 2021-06-23 10:01:13 -07:00 committed by GitHub
parent c1e2757751
commit d623533707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -1366,6 +1366,11 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}
public hasSuccessfulDelivery(): boolean {
const recipients = this.get('recipients') || [];
if (recipients.length === 0) {
return true;
}
return (this.get('sent_to') || []).length !== 0;
}