mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-19 17:13:31 -04:00
fix: don't report a status if user is offline
should be fixed with revoltchat/backend#319
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user