fix: don't report a status if user is offline

should be fixed with revoltchat/backend#319
This commit is contained in:
Paul Makles
2024-06-04 18:48:54 +01:00
committed by Paul Makles
parent eebc75ca65
commit ec91af59cf
+3
View File
@@ -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;
}