mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
Use smeared timestamps for chat creation times
This commit is contained in:
10
src/chat.rs
10
src/chat.rs
@@ -1535,6 +1535,7 @@ impl ChatIdBlocked {
|
||||
_ => (),
|
||||
}
|
||||
|
||||
let created_timestamp = dc_create_smeared_timestamp(context).await;
|
||||
let chat_id = context
|
||||
.sql
|
||||
.transaction(move |transaction| {
|
||||
@@ -1547,7 +1548,7 @@ impl ChatIdBlocked {
|
||||
chat_name,
|
||||
params.to_string(),
|
||||
create_blocked as u8,
|
||||
time(),
|
||||
created_timestamp,
|
||||
],
|
||||
)?;
|
||||
let chat_id = ChatId::new(
|
||||
@@ -2214,7 +2215,12 @@ pub async fn create_group_chat(
|
||||
"INSERT INTO chats
|
||||
(type, name, grpid, param, created_timestamp)
|
||||
VALUES(?, ?, ?, \'U=1\', ?);",
|
||||
paramsv![Chattype::Group, chat_name, grpid, time(),],
|
||||
paramsv![
|
||||
Chattype::Group,
|
||||
chat_name,
|
||||
grpid,
|
||||
dc_create_smeared_timestamp(context).await,
|
||||
],
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user