feat: Synchronize encrypted groups creation across devices (#7001)

Unencrypted groups don't have grpid since key-contacts were merged, so we don't sync them for now.
This commit is contained in:
iequidoo
2025-09-14 00:25:49 -03:00
committed by iequidoo
parent 59fac54f7b
commit 04c2585c27
3 changed files with 100 additions and 29 deletions

View File

@@ -2164,6 +2164,7 @@ RETURNING id
if !chat_id.is_trash() && !hidden {
let mut chat = Chat::load_from_db(context, chat_id).await?;
let mut update_param = false;
// In contrast to most other update-timestamps,
// use `sort_timestamp` instead of `sent_timestamp` for the subject-timestamp comparison.
@@ -2177,6 +2178,14 @@ RETURNING id
let subject = mime_parser.get_subject().unwrap_or_default();
chat.param.set(Param::LastSubject, subject);
update_param = true;
}
if chat.is_unpromoted() {
chat.param.remove(Param::Unpromoted);
update_param = true;
}
if update_param {
chat.update_param(context).await?;
}
}