diff options
| author | Daniel Weipert <git@mail.dweipert.de> | 2025-12-13 16:27:53 +0100 |
|---|---|---|
| committer | Daniel Weipert <git@mail.dweipert.de> | 2025-12-13 16:27:53 +0100 |
| commit | 2386148b8f048ba40d9f26cc97898bdcdc778ea2 (patch) | |
| tree | 48ca45de3dc6133cb0225eba8c5917f813082b2b /matrix-specification/Requests/ClientSyncGetRequest.php | |
| parent | b19a8f63ad727a3633885d3f2b81edf8181a53b9 (diff) | |
Diffstat (limited to 'matrix-specification/Requests/ClientSyncGetRequest.php')
| -rw-r--r-- | matrix-specification/Requests/ClientSyncGetRequest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/matrix-specification/Requests/ClientSyncGetRequest.php b/matrix-specification/Requests/ClientSyncGetRequest.php index 2ab7d9e..f19e820 100644 --- a/matrix-specification/Requests/ClientSyncGetRequest.php +++ b/matrix-specification/Requests/ClientSyncGetRequest.php @@ -2,9 +2,11 @@ namespace Matrix\Requests; +use Matrix\Enums\ApiPathVersion; use Matrix\Enums\PresenceState; +use Matrix\Request; -class ClientSyncGetRequest implements RequiresAuthentication +class ClientSyncGetRequest extends Request implements RequiresAuthentication { public function __construct( private ?string $filter = null, @@ -24,6 +26,11 @@ class ClientSyncGetRequest implements RequiresAuthentication $this->useStateAfter ??= false; } + public function getUri(string $scheme, string $serverName, ApiPathVersion $version): string + { + return "{$scheme}://{$serverName}/_matrix/client/{$version}/sync"; + } + public function getQueryParameters(): array { return array_filter([ @@ -33,6 +40,11 @@ class ClientSyncGetRequest implements RequiresAuthentication "since" => $this->since, "timeout" => $this->timeout, "use_state_after" => $this->useStateAfter, - ], "is_null"); + ], fn ($value) => ! is_null($value)); + } + + public function getBody(): array + { + return []; } } |
