Skip to content

Commit

Permalink
fix: don't report a status if user is offline
Browse files Browse the repository at this point in the history
should be fixed with revoltchat/backend#319
  • Loading branch information
insertish committed Jun 8, 2024
1 parent eebc75c commit ec91af5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/classes/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export class User {
* User Status
*/
get status() {
// TODO: issue with API, upstream fix required #319
if (!this.online)
return { text: undefined, presence: "Invisible" as const };
return this.#collection.getUnderlyingObject(this.id).status;
}

Expand Down

0 comments on commit ec91af5

Please sign in to comment.