1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Implement minimal chat service, fix some implement bugs

This commit is contained in:
NGnius (Graham)
2025-02-23 20:17:46 -05:00
parent 2907376722
commit 2106613f62
21 changed files with 227 additions and 194 deletions

View File

@@ -1,23 +0,0 @@
use polariton::operation::Typed;
pub struct ClanInviteInfo {
pub username: String,
pub display_name: String,
pub clan_name: String,
pub clan_size: i32,
pub use_custom_avatar: bool,
pub avatar_id: i32,
}
impl ClanInviteInfo {
pub fn as_transmissible(&self) -> Typed {
Typed::HashMap(vec![
(Typed::Str("userName".into()), Typed::Str(self.username.clone().into())),
(Typed::Str("displayName".into()), Typed::Str(self.display_name.clone().into())),
(Typed::Str("clanName".into()), Typed::Str(self.clan_name.clone().into())),
(Typed::Str("clanSize".into()), Typed::Int(self.clan_size)),
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
].into())
}
}

View File

@@ -1,19 +0,0 @@
use polariton::operation::Typed;
pub struct AvatarInfo {
pub name: String,
pub use_custom_avatar: bool,
pub avatar_id: i32,
}
impl AvatarInfo {
pub fn as_transmissible(&self) -> Typed {
Typed::HashMap(vec![
(Typed::Str("name".into()), Typed::Str(self.name.clone().into())),
(Typed::Str("useCustomAvatar".into()), Typed::Bool(self.use_custom_avatar.into())),
(Typed::Str("avatarId".into()), Typed::Int(self.avatar_id)),
].into())
}
}
// TODO pub struct FriendInfo {}

View File

@@ -1,2 +0,0 @@
pub mod friend;
pub mod clan_invite;