From c9866f89a3defcd9b8c1d4d1c016bda542884852 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 18 Jul 2025 11:09:04 +0200 Subject: [PATCH] fix(chat): Fix guests in a fully empty chat Signed-off-by: Joas Schilling [skip ci] --- lib/Service/RoomFormatter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Service/RoomFormatter.php b/lib/Service/RoomFormatter.php index 346016050..4d9c1205b 100644 --- a/lib/Service/RoomFormatter.php +++ b/lib/Service/RoomFormatter.php @@ -403,6 +403,11 @@ class RoomFormatter { } } + if ($roomData['lastReadMessage'] === 0) { + // Guest in a fully expired chat, no history, just loading the chat from beginning for now + $roomData['lastReadMessage'] = ChatManager::UNREAD_FIRST_MESSAGE; + } + if ($currentUser instanceof IUser && $attendee->getActorType() === Attendee::ACTOR_USERS && $roomData['lastReadMessage'] === ChatManager::UNREAD_FIRST_MESSAGE