From ec91af59cf848b09b6d8579f477242d57aa248bb Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Tue, 4 Jun 2024 18:48:54 +0100 Subject: [PATCH] fix: don't report a status if user is offline should be fixed with revoltchat/backend#319 --- src/classes/User.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/classes/User.ts b/src/classes/User.ts index a22d6320..7a71e72f 100644 --- a/src/classes/User.ts +++ b/src/classes/User.ts @@ -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; }