summaryrefslogtreecommitdiff
path: root/matrix-specification/Events/StrippedStateEvent.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Events/StrippedStateEvent.php')
-rw-r--r--matrix-specification/Events/StrippedStateEvent.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/matrix-specification/Events/StrippedStateEvent.php b/matrix-specification/Events/StrippedStateEvent.php
new file mode 100644
index 0000000..6e8aea6
--- /dev/null
+++ b/matrix-specification/Events/StrippedStateEvent.php
@@ -0,0 +1,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,
+ ];
+ }
+}