blob: ced41725613840c5f8e333ddf2256720b0c14292 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?php
namespace Matrix\Data\Room;
class PreviousRoom implements \JsonSerializable
{
public function __construct(
private string $roomId,
private ?string $eventId = null,
)
{}
public function jsonSerialize(): array
{
return array_filter([
"event_id" => $this->eventId,
"room_id" => $this->roomId,
], fn ($value) => ! is_null($value));
}
}
|