summaryrefslogtreecommitdiff
path: root/matrix-specification/Data/Room/AvatarInfo.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2026-03-05 14:57:28 +0100
committerDaniel Weipert <git@mail.dweipert.de>2026-03-05 14:57:28 +0100
commitbd11271621bd3759cfd194ed0119c0dc28155fd0 (patch)
tree319b4790d4e2b05513abf023732ed6fb0717f603 /matrix-specification/Data/Room/AvatarInfo.php
parent2386148b8f048ba40d9f26cc97898bdcdc778ea2 (diff)
updateHEADmain
Diffstat (limited to 'matrix-specification/Data/Room/AvatarInfo.php')
-rw-r--r--matrix-specification/Data/Room/AvatarInfo.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/matrix-specification/Data/Room/AvatarInfo.php b/matrix-specification/Data/Room/AvatarInfo.php
new file mode 100644
index 0000000..473beb9
--- /dev/null
+++ b/matrix-specification/Data/Room/AvatarInfo.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Matrix\Data\Room;
+
+class AvatarInfo implements \JsonSerializable
+{
+ public function __construct(
+ private int $height,
+ private string $mimeType,
+ private int $fileSize,
+ private ThumbnailInfo $thumbnailInfo,
+ private string $thumbnailUrl,
+ private int $width,
+ )
+ {}
+
+ public function jsonSerialize(): array
+ {
+ return [
+ "h" => $this->height,
+ "mimetype" => $this->mimeType,
+ "size" => $this->fileSize,
+ "thumbnail_info" => $this->thumbnailInfo,
+ "thumbnail_url" => $this->thumbnailUrl,
+ "w" => $this->width,
+ ];
+ }
+}