diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2025-09-25 13:38:24 +0200 |
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2025-09-25 13:38:24 +0200 |
| commit | b19a8f63ad727a3633885d3f2b81edf8181a53b9 (patch) | |
| tree | 6b5fd70224a125a16010a291e5fd0df834e9436f /matrix-specification/Events/PresenceEvent.php | |
| parent | b08047ba485f86038f33175162943c0a9878ab1a (diff) | |
matrix-specification split work in progress
Diffstat (limited to 'matrix-specification/Events/PresenceEvent.php')
| -rw-r--r-- | matrix-specification/Events/PresenceEvent.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/matrix-specification/Events/PresenceEvent.php b/matrix-specification/Events/PresenceEvent.php index f71d4bd..c8c2023 100644 --- a/matrix-specification/Events/PresenceEvent.php +++ b/matrix-specification/Events/PresenceEvent.php @@ -10,22 +10,22 @@ class PresenceEvent extends SenderEvent public function __construct( string $sender, PresenceState $presence, - string $avatarUrl = "", - bool $currentlyActive = false, - string $displayName = "", - int $lastActiveAgo = 0, - string $statusMessage = "", + ?string $avatarUrl = null, + ?bool $currentlyActive = null, + ?string $displayName = null, + ?int $lastActiveAgo = null, + ?string $statusMessage = null, ) { parent::__construct( - [ + array_filter([ "avatar_url" => $avatarUrl, "currently_active" => $currentlyActive, "display_name" => $displayName, "last_active_ago" => $lastActiveAgo, "presence" => $presence, "status_msg" => $statusMessage, - ], + ], "is_null"), $sender, EventType::PRESENCE ); |
