aboutsummaryrefslogtreecommitdiffstats
path: root/luz/src/chat.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-02-12 17:33:12 +0000
committerLibravatar cel 🌸 <cel@bunny.garden>2025-02-12 17:33:12 +0000
commit05b0d38490a69d058cdd0ee7b17140634d116af2 (patch)
tree2a6c29f55fd7f6db16d67da000d2beedb5d72c8d /luz/src/chat.rs
parent8e6aa698b35f62dcd3d5c627f39dde53d0b1154d (diff)
downloadluz-05b0d38490a69d058cdd0ee7b17140634d116af2.tar.gz
luz-05b0d38490a69d058cdd0ee7b17140634d116af2.tar.bz2
luz-05b0d38490a69d058cdd0ee7b17140634d116af2.zip
WIP: rfc 6121 data(base)types
Diffstat (limited to 'luz/src/chat.rs')
-rw-r--r--luz/src/chat.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/luz/src/chat.rs b/luz/src/chat.rs
new file mode 100644
index 0000000..a084d29
--- /dev/null
+++ b/luz/src/chat.rs
@@ -0,0 +1,30 @@
+use uuid::Uuid;
+
+use crate::roster::Contact;
+
+pub enum Chat {
+ Direct(DM),
+ Channel(Channel),
+}
+
+#[derive(Debug)]
+pub struct Message {
+ id: Uuid,
+ // contains full contact information
+ from: Contact,
+ // TODO: rich text, other contents, threads
+ body: Body,
+}
+
+#[derive(Debug)]
+pub struct Body {
+ body: String,
+}
+
+pub struct DM {
+ contact: Contact,
+ message_history: Vec<Message>,
+}
+
+// TODO: group chats
+pub struct Channel {}