summaryrefslogtreecommitdiff
path: root/matrix-specification/Events/StrippedStateEvent.php
blob: 3eea58241a2314139f85a057627f782d02cefa5b (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,
    protected string $stateKey,
    EventType $type,
  )
  {
    parent::__construct($content, $type);
  }

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