Restore chat functionality with a very rough UI
This commit is contained in:
parent
da5a77badf
commit
ddda5a559b
13 changed files with 440 additions and 185 deletions
|
@ -82,7 +82,7 @@ impl Database {
|
|||
id: row.id.to_proto(),
|
||||
sender_id: row.sender_id.to_proto(),
|
||||
body: row.body,
|
||||
timestamp: row.sent_at.unix_timestamp() as u64,
|
||||
timestamp: row.sent_at.assume_utc().unix_timestamp() as u64,
|
||||
nonce: Some(proto::Nonce {
|
||||
upper_half: nonce.0,
|
||||
lower_half: nonce.1,
|
||||
|
@ -124,6 +124,9 @@ impl Database {
|
|||
Err(anyhow!("not a chat participant"))?;
|
||||
}
|
||||
|
||||
let timestamp = timestamp.to_offset(time::UtcOffset::UTC);
|
||||
let timestamp = time::PrimitiveDateTime::new(timestamp.date(), timestamp.time());
|
||||
|
||||
let message = channel_message::Entity::insert(channel_message::ActiveModel {
|
||||
channel_id: ActiveValue::Set(channel_id),
|
||||
sender_id: ActiveValue::Set(user_id),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue