blob: 02793eae6a810b546de4d4499c6ff4ef5ec8a312 (
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
32
33
|
<?php
namespace App\Events;
use App\Types\EventType;
class RoomMemberEvent extends Event
{
public function __construct(
private string $sender,
private string $stateKey,
private string $membership,
)
{
parent::__construct(EventType::ROOM_MEMBER);
}
public function fromJson(string $json): static
{
}
public function toJsonEncodeable(): array
{
return [
"type" => $this->type,
"sender" => $this->sender,
"state_key" => $this->stateKey,
"content" => [
"membership" => $this->membership,
],
];
}
}
|