Basic family join/leave implementation, tests not fully working

This commit is contained in:
Philip (a-0) 2024-03-23 17:46:25 +01:00
parent ec0a55b286
commit 636aff64b9
14 changed files with 429 additions and 151 deletions

View file

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use crate::types::{ElementContent, ElementId, MessageId, PotId};
use crate::types::{ElementContent, ElementId, Family, FamilyId, MessageId, PotId};
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Message {
@ -19,6 +19,11 @@ pub enum MessageContent {
Hello {
peer_name: String,
},
JoinFamily,
AddedToFamily {
family: Family,
},
LeaveFamily,
CreateElement {
id: ElementId,
content: ElementContent,
@ -34,7 +39,7 @@ pub enum MessageContent {
AddPot {
id: PotId,
app_type: String,
}
},
}
#[derive(Serialize, Deserialize, Debug, Clone)]