Removing "name", Owner role, Promoting, Live events!

This commit is contained in:
2024-09-28 13:01:53 -04:00
Unverified
parent ff6f648748
commit c2ec816188
6 changed files with 285 additions and 78 deletions

View File

@@ -1,6 +1,64 @@
use durian::bincode_packet;
use crate::types::{Message, Room, User};
#[bincode_packet]
pub struct Greet {
id: u32
pub id: u32
}
#[bincode_packet]
pub struct UserJoinedEvent {
pub user: User,
}
#[bincode_packet]
pub struct UserLeftEvent {
pub user: User,
}
#[bincode_packet]
pub struct NewMessageEvent {
pub message: Message,
}
#[bincode_packet]
pub struct StartTypingEvent {
pub user: User,
pub room: String,
}
#[bincode_packet]
pub struct StopTypingEvent {
pub user: User,
pub room: String,
}
#[bincode_packet]
pub struct NewRoomEvent {
pub room: Room,
}
#[bincode_packet]
pub struct DeleteRoomEvent {
pub roomid: String,
}
#[bincode_packet]
pub struct KickedUserEvent {
pub userid: String,
}
#[bincode_packet]
pub struct BannedUserEvent {
pub userid: String,
}
#[bincode_packet]
pub struct PromotedUserEvent {
pub userid: String,
}
#[bincode_packet]
pub struct DemotedUserEvent {
pub userid: String,
}