From b1b101fd98c8b4354a4e0c73e867d817466de30e Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 11 Sep 2025 13:19:21 +0200 Subject: sync, rooms, events, etc --- src/Events/Event.php | 16 ++++++++++++++++ src/Events/PresenceEvent.php | 40 ++++++++++++++++++++++++++++++++++++++++ src/Events/RoomMemberEvent.php | 33 +++++++++++++++++++++++++++++++++ src/Events/RoomNameEvent.php | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 src/Events/Event.php create mode 100644 src/Events/PresenceEvent.php create mode 100644 src/Events/RoomMemberEvent.php create mode 100644 src/Events/RoomNameEvent.php (limited to 'src/Events') diff --git a/src/Events/Event.php b/src/Events/Event.php new file mode 100644 index 0000000..cab1b14 --- /dev/null +++ b/src/Events/Event.php @@ -0,0 +1,16 @@ + $this->type, + "sender" => $this->sender, + "content" => [ + "avatar_url" => $this->avatarUrl, + "currently_active" => $this->currentlyActive, + "last_active_ago" => $this->lastActiveAgo, + "presence" => $this->presence, + "status_msg" => $this->statusMessage, + ], + ]; + } +} diff --git a/src/Events/RoomMemberEvent.php b/src/Events/RoomMemberEvent.php new file mode 100644 index 0000000..02793ea --- /dev/null +++ b/src/Events/RoomMemberEvent.php @@ -0,0 +1,33 @@ + $this->type, + "sender" => $this->sender, + "state_key" => $this->stateKey, + "content" => [ + "membership" => $this->membership, + ], + ]; + } +} diff --git a/src/Events/RoomNameEvent.php b/src/Events/RoomNameEvent.php new file mode 100644 index 0000000..59abbe2 --- /dev/null +++ b/src/Events/RoomNameEvent.php @@ -0,0 +1,33 @@ + $this->type, + "sender" => $this->sender, + "state_key" => $this->stateKey, + "content" => [ + "name" => $this->name, + ], + ]; + } +} -- cgit v1.2.3