mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-03 22:45:01 +00:00
Account image URL is null if unset
This commit is contained in:
@ -182,11 +182,11 @@ impl User {
|
||||
|
||||
/// Get the URL pointing to a user account image for an administrator. An administrator can
|
||||
/// only access to the user account image if it is visible to all Comunic users
|
||||
pub fn account_image_url_for_admin(&self) -> String {
|
||||
pub fn account_image_url_for_admin(&self) -> Option<String> {
|
||||
match (&self.account_image_visibility, &self.account_image_path) {
|
||||
(AccountImageVisibility::FRIENDS, _) => User::error_account_image_url(),
|
||||
(_, None) => User::default_account_image_url(),
|
||||
(_, Some(path)) => user_data_url(path),
|
||||
(_, None) => None,
|
||||
(AccountImageVisibility::FRIENDS, _) => Some(User::error_account_image_url()),
|
||||
(_, Some(path)) => Some(user_data_url(path)),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user