Send avatarType explicitly in profile

This commit is contained in:
Johannes Zellner
2024-01-29 13:35:54 +01:00
parent 35eb17a922
commit b03240ccb8
3 changed files with 15 additions and 9 deletions

View File

@@ -618,6 +618,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
twoFactorAuthenticationEnabled: false,
source: null,
avatarUrl: null,
avatarType: null,
hasBackgroundImage: false
};
this._config = {
@@ -747,6 +748,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
this._userInfo.role = userInfo.role;
this._userInfo.source = userInfo.source;
this._userInfo.avatarUrl = userInfo.avatarUrl + '?ts=' + Date.now(); // we add the timestamp to avoid caching
this._userInfo.avatarType = userInfo.avatarType;
this._userInfo.hasBackgroundImage = userInfo.hasBackgroundImage;
this._userInfo.isAtLeastOwner = [ ROLES.OWNER ].indexOf(userInfo.role) !== -1;
this._userInfo.isAtLeastAdmin = [ ROLES.OWNER, ROLES.ADMIN ].indexOf(userInfo.role) !== -1;