mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56: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
|
let chat_id = context
|
||||||
.sql
|
.sql
|
||||||
.transaction(move |transaction| {
|
.transaction(move |transaction| {
|
||||||
@@ -1547,7 +1548,7 @@ impl ChatIdBlocked {
|
|||||||
chat_name,
|
chat_name,
|
||||||
params.to_string(),
|
params.to_string(),
|
||||||
create_blocked as u8,
|
create_blocked as u8,
|
||||||
time(),
|
created_timestamp,
|
||||||
],
|
],
|
||||||
)?;
|
)?;
|
||||||
let chat_id = ChatId::new(
|
let chat_id = ChatId::new(
|
||||||
@@ -2214,7 +2215,12 @@ pub async fn create_group_chat(
|
|||||||
"INSERT INTO chats
|
"INSERT INTO chats
|
||||||
(type, name, grpid, param, created_timestamp)
|
(type, name, grpid, param, created_timestamp)
|
||||||
VALUES(?, ?, ?, \'U=1\', ?);",
|
VALUES(?, ?, ?, \'U=1\', ?);",
|
||||||
paramsv![Chattype::Group, chat_name, grpid, time(),],
|
paramsv![
|
||||||
|
Chattype::Group,
|
||||||
|
chat_name,
|
||||||
|
grpid,
|
||||||
|
dc_create_smeared_timestamp(context).await,
|
||||||
|
],
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
@@ -1797,7 +1797,7 @@ async fn create_multiuser_record(
|
|||||||
grpname.as_ref(),
|
grpname.as_ref(),
|
||||||
grpid.as_ref(),
|
grpid.as_ref(),
|
||||||
create_blocked,
|
create_blocked,
|
||||||
time(),
|
dc_create_smeared_timestamp(context).await,
|
||||||
create_protected,
|
create_protected,
|
||||||
],
|
],
|
||||||
).await?;
|
).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user