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

Enable premium, add custom avatar saving support to complete #10

This commit is contained in:
NG (Graham)
2025-08-13 17:36:44 -04:00
parent 2642767a27
commit a8692b2839
16 changed files with 178 additions and 17 deletions

View File

@@ -61,7 +61,7 @@ pub trait UserAuthenticator {
}
#[async_trait::async_trait]
pub trait User<C>: ChatUser + LobbyUser + MultiplayerUser {
pub trait User<C>: ChatUser + LobbyUser + MultiplayerUser + IntercomUser {
fn public_id(&self) -> &'_ str;
fn is_mod(&self) -> bool;
fn is_admin(&self) -> bool;
@@ -328,3 +328,8 @@ pub trait MultiplayerUser {
async fn complete_game(&self, guid: &str) -> Result<(), MultiplayerError>;
async fn game_info(&self, guid: &str) -> Result<Option<GameDescriptor>, MultiplayerError>;
}
#[async_trait::async_trait]
pub trait IntercomUser {
async fn save_custom_avatar(&self, image: Vec<u8>) -> Result<(), polariton_server::operations::SimpleOpError>;
}