summaryrefslogtreecommitdiff
path: root/matrix-specification/Events/StrippedStateEvent.php
blob: 6e8aea6ecdb38184ba09af741090f2d1b330210c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

namespace Matrix\Events;

use Matrix\Enums\EventType;

class StrippedStateEvent extends SenderEvent
{
  /**
   * @param array<string, mixed> $content
   */
  public function __construct(
    array $content,
    string $sender,
    private string $stateKey,
    EventType $type,
  )
  {
    parent::__construct($content, $sender, $type);
  }

  public function jsonSerialize(): array
  {
    return [
      "content" => $this->content,
      "sender" => $this->sender,
      "state_key" => $this->stateKey,
      "type" => $this->type,
    ];
  }
}