diff options
author | 2025-03-06 10:43:57 +0000 | |
---|---|---|
committer | 2025-03-06 10:43:57 +0000 | |
commit | b81f7f5bb418fb64211e5ec711cbcbecf8a681aa (patch) | |
tree | a4817781c7883417a9da37b68caab45848b773ca /luz/src/chat.rs | |
parent | 9baf682466d191f23dc830a9897948d84068b3cc (diff) | |
download | luz-b81f7f5bb418fb64211e5ec711cbcbecf8a681aa.tar.gz luz-b81f7f5bb418fb64211e5ec711cbcbecf8a681aa.tar.bz2 luz-b81f7f5bb418fb64211e5ec711cbcbecf8a681aa.zip |
feat: order chats by most recent message
Diffstat (limited to 'luz/src/chat.rs')
-rw-r--r-- | luz/src/chat.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/luz/src/chat.rs b/luz/src/chat.rs index 97518da..c1194ea 100644 --- a/luz/src/chat.rs +++ b/luz/src/chat.rs @@ -31,10 +31,15 @@ pub struct Body { #[derive(sqlx::FromRow, Debug, Clone)] pub struct Chat { pub correspondent: JID, + // pub unread_messages: i32, + // pub latest_message: Message, + // when a new message is received, the chat should be updated, and the new message should be delivered too. // message history is not stored in chat, retreived separately. // pub message_history: Vec<Message>, } +pub enum ChatUpdate {} + impl Chat { pub fn new(correspondent: JID) -> Self { Self { correspondent } |