summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/Presence.php
blob: 971343f8097f75ab38398dc7e518bf3cfe294170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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,
    ];
  }
}