1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Can get account image settings

This commit is contained in:
2021-01-19 18:14:17 +01:00
parent 6c7fa3afa5
commit 364a98634f
5 changed files with 50 additions and 1 deletions

View File

@ -59,6 +59,16 @@ pub enum AccountImageVisibility {
EVERYONE,
}
impl AccountImageVisibility {
pub fn to_api(&self) -> String {
match self {
AccountImageVisibility::FRIENDS => "friends".to_string(),
AccountImageVisibility::COMUNIC_USERS => "public".to_string(),
AccountImageVisibility::EVERYONE => "open".to_string(),
}
}
}
#[derive(Debug)]
pub struct User {
pub id: UserID,