Add User::getPresenceString

This commit is contained in:
Max Nuding 2025-05-20 17:51:25 +02:00
parent 848c1ae91e
commit 7f0f8ac95b
Signed by: phlaym
SSH Key Fingerprint: SHA256:mionmF+5trOUI1AxqzAU1ZK3tv6IiDcdKGXcMWwa1nQ

View File

@ -52,6 +52,17 @@ class User
} }
} }
public function getPresenceString()
{
if ($this->presence === true) {
return "online";
} elseif ($this->presence === false) {
return "offline";
} else {
return "presence unknown";
}
}
public function getAvatarUrl( public function getAvatarUrl(
?int $width = null, ?int $width = null,
?int $height = null ?int $height = null