Clean up old messages, better handle errors from sending
This commit is contained in:
parent
bf63c7cc13
commit
727925a266
10 changed files with 232 additions and 66 deletions
|
@ -797,6 +797,18 @@
|
|||
});
|
||||
message.set({ id });
|
||||
|
||||
// We're offline!
|
||||
if (!textsecure.messaging) {
|
||||
const errors = this.contactCollection.map(contact => {
|
||||
const error = new Error('Network is not available');
|
||||
error.name = 'SendMessageNetworkError';
|
||||
error.number = contact.id;
|
||||
return error;
|
||||
});
|
||||
await message.saveErrors(errors);
|
||||
return;
|
||||
}
|
||||
|
||||
const conversationType = this.get('type');
|
||||
const sendFunction = (() => {
|
||||
switch (conversationType) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue