Persist chat mentions

This commit is contained in:
Max Brunsfeld 2023-10-18 16:56:03 -07:00
parent 821419ee5b
commit d05404a4df
22 changed files with 402 additions and 112 deletions

View file

@ -2885,6 +2885,8 @@ async fn send_channel_message(
return Err(anyhow!("message can't be blank"))?;
}
// TODO: adjust mentions if body is trimmed
let timestamp = OffsetDateTime::now_utc();
let nonce = request
.nonce
@ -2898,6 +2900,7 @@ async fn send_channel_message(
channel_id,
session.user_id,
&body,
&request.mentions,
timestamp,
nonce.clone().into(),
)
@ -2906,6 +2909,7 @@ async fn send_channel_message(
sender_id: session.user_id.to_proto(),
id: message_id.to_proto(),
body,
mentions: request.mentions,
timestamp: timestamp.unix_timestamp() as u64,
nonce: Some(nonce),
};