fix: Context::execute_sync_items: Ignore all errors (#4817)

An error while executing an item mustn't prevent next items from being executed. There was a comment
that only critical errors like db write failures must be reported upstack, but in fact it's hard to
achieve in the current design, there are no error codes or so, so it's bug-prone. E.g.
`ChatAction::Block` and `Unblock` already reported all errors upstack. So, let's make error handling
the same as everywhere and just ignore any errors in the item execution loop. In the worst case we
just do more unsuccessful db writes f.e.
This commit is contained in:
iequidoo
2023-11-09 05:30:54 -03:00
committed by iequidoo
parent fa61d90115
commit b06a7e7197
3 changed files with 36 additions and 37 deletions

View File

@@ -4274,9 +4274,6 @@ impl Context {
}
ChatAction::SetContacts(addrs) => set_contacts_by_addrs(self, chat_id, addrs).await,
}
.log_err(self)
.ok();
Ok(())
}
}