fix(chat): Fix guests in a fully empty chat

Signed-off-by: Joas Schilling <coding@schilljs.com>

[skip ci]
This commit is contained in:
Joas Schilling
2025-07-18 11:09:04 +02:00
committed by backportbot[bot]
parent 1f092319fd
commit c9866f89a3

View File

@ -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