Browse Source
fix(federation): Allow to federate setReadMarker() without lastReadMessage ID
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/11798/head
Joas Schilling
2 years ago
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
1 changed files with
3 additions and
3 deletions
-
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 */ |
|
|
|
|