mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 22:06:29 +03:00
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:
@@ -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?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user