fix(profiles): online null when not authenticated

This commit is contained in:
AdrienLSH
2024-04-28 09:50:38 +02:00
parent 9fea10fc91
commit 4351c335cb
3 changed files with 8 additions and 2 deletions

View File

@ -30,6 +30,11 @@ export class Profile extends AExchangeable
*/
this.avatar = avatar;
/**
* @type {Boolean}
**/
this.online = null;
/**
* @type {Boolean}
*/
@ -58,6 +63,7 @@ export class Profile extends AExchangeable
this.id = response_data.id;
this.username = response_data.username;
this.avatar = response_data.avatar;
this.online = response_data.online
if (!this.client.me || this.client.me.id === this.id)
return;