diff options
Diffstat (limited to 'matrix-specification/Data/Presence.php')
| -rw-r--r-- | matrix-specification/Data/Presence.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/matrix-specification/Data/Presence.php b/matrix-specification/Data/Presence.php new file mode 100644 index 0000000..971343f --- /dev/null +++ b/matrix-specification/Data/Presence.php @@ -0,0 +1,23 @@ +<?php + +namespace Matrix\Data; + +use Matrix\Events\PresenceEvent; + +class Presence implements \JsonSerializable +{ + /** + * @param PresenceEvent[] $events + */ + public function __construct( + private array $events + ) + {} + + public function jsonSerialize(): array + { + return [ + "events" => $this->events, + ]; + } +} |
