Clean up old messages, better handle errors from sending
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user