feat: Sync chat Blocked state across devices (#4817)

This commit is contained in:
iequidoo
2023-10-20 02:39:30 -03:00
committed by iequidoo
parent 0619e2a129
commit 79cebe66de
6 changed files with 257 additions and 16 deletions

View File

@@ -887,7 +887,7 @@ async fn add_parts(
// automatically unblock chat when the user sends a message
if chat_id_blocked != Blocked::Not {
if let Some(chat_id) = chat_id {
chat_id.unblock(context).await?;
chat_id.unblock(&context.nosync()).await?;
chat_id_blocked = Blocked::Not;
}
}
@@ -919,7 +919,7 @@ async fn add_parts(
if let Some(chat_id) = chat_id {
if Blocked::Not != chat_id_blocked {
chat_id.unblock(context).await?;
chat_id.unblock(&context.nosync()).await?;
// Not assigning `chat_id_blocked = Blocked::Not` to avoid unused_assignments warning.
}
}