mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-19 17:13:31 -04:00
fix: also hide status message if offline
This commit is contained in:
+4
-4
@@ -140,10 +140,10 @@ export class User {
|
||||
* @returns Status message
|
||||
*/
|
||||
statusMessage(translate: (presence: Presence) => string = (a) => a) {
|
||||
return (
|
||||
this.status?.text ??
|
||||
(this.presence === "Focus" ? translate("Focus") : undefined)
|
||||
);
|
||||
return this.online
|
||||
? this.status?.text ??
|
||||
(this.presence === "Focus" ? translate("Focus") : undefined)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user