diff options
author | Joas Schilling <coding@schilljs.com> | 2024-03-14 11:42:10 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-03-14 11:42:10 +0100 |
commit | 0df96313031bec9db6913e56e8926015b4cc59da (patch) | |
tree | 5ae6949e54c8e68dbe5de042751ff387e1c11640 /lib/Federation | |
parent | c9ef4b7b847aa6d1a096842a9fcfef118d6ff607 (diff) |
fix(federation): Allow to federate setReadMarker() without lastReadMessage ID
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Federation')
-rw-r--r-- | lib/Federation/Proxy/TalkV1/Controller/ChatController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Federation/Proxy/TalkV1/Controller/ChatController.php b/lib/Federation/Proxy/TalkV1/Controller/ChatController.php index 4ceb5a4a3..a601166d1 100644 --- a/lib/Federation/Proxy/TalkV1/Controller/ChatController.php +++ b/lib/Federation/Proxy/TalkV1/Controller/ChatController.php @@ -371,14 +371,14 @@ class ChatController { * * 200: List of mention suggestions returned */ - public function setReadMarker(Room $room, Participant $participant, string $responseFormat, int $lastReadMessage): DataResponse { + public function setReadMarker(Room $room, Participant $participant, string $responseFormat, ?int $lastReadMessage): DataResponse { $proxy = $this->proxy->post( $participant->getAttendee()->getInvitedCloudId(), $participant->getAttendee()->getAccessToken(), $room->getRemoteServer() . '/ocs/v2.php/apps/spreed/api/v1/chat/' . $room->getRemoteToken() . '/read', - [ + $lastReadMessage !== null ? [ 'lastReadMessage' => $lastReadMessage, - ], + ] : [], ); /** @var TalkRoom $data */ |