aboutsummaryrefslogtreecommitdiffstats
path: root/luz/src/chat.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2025-02-14 12:57:21 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2025-02-14 12:57:21 +0000
commit8dcdfe405ecafea04b301a16580ab703a10645eb (patch)
treec9dca09e7a53734f8243cd0f4e32c050abd58312 /luz/src/chat.rs
parent05b0d38490a69d058cdd0ee7b17140634d116af2 (diff)
downloadluz-8dcdfe405ecafea04b301a16580ab703a10645eb.tar.gz
luz-8dcdfe405ecafea04b301a16580ab703a10645eb.tar.bz2
luz-8dcdfe405ecafea04b301a16580ab703a10645eb.zip
WIP: data(base)type
Diffstat (limited to 'luz/src/chat.rs')
-rw-r--r--luz/src/chat.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/luz/src/chat.rs b/luz/src/chat.rs
index a084d29..091b3b6 100644
--- a/luz/src/chat.rs
+++ b/luz/src/chat.rs
@@ -1,17 +1,12 @@
use uuid::Uuid;
-use crate::roster::Contact;
-
-pub enum Chat {
- Direct(DM),
- Channel(Channel),
-}
+use crate::{roster::Contact, user::User};
#[derive(Debug)]
pub struct Message {
id: Uuid,
- // contains full contact information
- from: Contact,
+ // contains full user information
+ from: User,
// TODO: rich text, other contents, threads
body: Body,
}
@@ -21,10 +16,15 @@ pub struct Body {
body: String,
}
-pub struct DM {
- contact: Contact,
+pub struct Chat {
+ id: Uuid,
+ user: User,
message_history: Vec<Message>,
}
// TODO: group chats
-pub struct Channel {}
+// pub enum Chat {
+// Direct(DirectChat),
+// Channel(Channel),
+// }
+// pub struct Channel {}