summaryrefslogtreecommitdiff
path: root/matrix-specification/Events/SenderEvent.php
diff options
context:
space:
mode:
Diffstat (limited to 'matrix-specification/Events/SenderEvent.php')
-rw-r--r--matrix-specification/Events/SenderEvent.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/matrix-specification/Events/SenderEvent.php b/matrix-specification/Events/SenderEvent.php
index f3d4ceb..86ba65e 100644
--- a/matrix-specification/Events/SenderEvent.php
+++ b/matrix-specification/Events/SenderEvent.php
@@ -17,4 +17,18 @@ abstract class SenderEvent extends Event
{
parent::__construct($content, $type);
}
+
+ public function jsonSerialize(): array
+ {
+ return [
+ "content" => $this->content,
+ "sender" => $this->sender,
+ "type" => $this->type,
+ ];
+ }
+
+ public function getSender(): string
+ {
+ return $this->sender;
+ }
}