diff options
author | 2025-02-14 23:57:59 +0000 | |
---|---|---|
committer | 2025-02-14 23:57:59 +0000 | |
commit | 0d9e3d27e9b81411b4d4c53e1b1a1c29087d66f3 (patch) | |
tree | 90d6d4db55e281ed2f886c5ad034f28db8dc1b43 /luz/src/chat.rs | |
parent | 8dcdfe405ecafea04b301a16580ab703a10645eb (diff) | |
download | luz-0d9e3d27e9b81411b4d4c53e1b1a1c29087d66f3.tar.gz luz-0d9e3d27e9b81411b4d4c53e1b1a1c29087d66f3.tar.bz2 luz-0d9e3d27e9b81411b4d4c53e1b1a1c29087d66f3.zip |
WIP: data(base)type
Diffstat (limited to 'luz/src/chat.rs')
-rw-r--r-- | luz/src/chat.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/luz/src/chat.rs b/luz/src/chat.rs index 091b3b6..24ad709 100644 --- a/luz/src/chat.rs +++ b/luz/src/chat.rs @@ -1,3 +1,4 @@ +use jid::JID; use uuid::Uuid; use crate::{roster::Contact, user::User}; @@ -6,22 +7,27 @@ use crate::{roster::Contact, user::User}; pub struct Message { id: Uuid, // contains full user information - from: User, - // TODO: rich text, other contents, threads + from: Correspondent, body: Body, } #[derive(Debug)] pub struct Body { + // TODO: rich text, other contents, threads body: String, } pub struct Chat { - id: Uuid, - user: User, + correspondent: Correspondent, message_history: Vec<Message>, } +#[derive(Debug)] +pub enum Correspondent { + User(User), + Contact(Contact), +} + // TODO: group chats // pub enum Chat { // Direct(DirectChat), |