From 447a2b93448d70ace314a3afe22f81a5a6b51f1c Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Mon, 16 Jan 2023 13:43:27 -0300 Subject: [PATCH] Regression: App not fetching messages properly after #4801 (#4819) --- app/views/RoomView/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index 92f247f23..0e6f2d4ec 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -688,8 +688,8 @@ class RoomView extends React.Component { const newLastOpen = new Date(); await RoomServices.getMessages({ rid: room.rid, - lastOpen: 'lastOpen' in room ? room.lastOpen : undefined, - t: room.t as RoomType + t: room.t as RoomType, + ...('lastOpen' in room && room.lastOpen ? { lastOpen: room.lastOpen } : {}) }); // if room is joined