feat: Sync chats deletion across devices

Currently broadcast lists creation is synced across devices. Groups creation, in some means, too --
on a group promotion by a first message. Otoh, messages deletion is synced now as well. So, for
feature-completeness, sync chats deletion too.
This commit is contained in:
iequidoo
2023-11-15 02:29:58 -03:00
committed by l
parent ba0a7f1f0b
commit 586aae690c
3 changed files with 68 additions and 6 deletions

View File

@@ -743,6 +743,15 @@ impl TestContext {
Chat::load_from_db(self, chat_id).await.unwrap()
}
pub async fn assert_no_chat(&self, id: ChatId) {
assert!(Chat::load_from_db(self, id).await.is_err());
assert!(!self
.sql
.exists("SELECT COUNT(*) FROM chats WHERE id=?", (id,))
.await
.unwrap());
}
/// Sends out the text message.
///
/// This is not hooked up to any SMTP-IMAP pipeline, so the other account must call