diff --git a/client/views/room/Header/Header.js b/client/views/room/Header/Header.js index 08d297fc99d5..92e718b2eb55 100644 --- a/client/views/room/Header/Header.js +++ b/client/views/room/Header/Header.js @@ -52,7 +52,7 @@ const RoomHeader = ({ room }) => { const liveOtherUserStatusText = useUserData(otherUserQuery?.userId)?.statusText; // if the other is offline, then liveOtherUserStatusText is undefined - const { value: data } = useEndpointData('users.info', otherUserQuery); + const { value: data } = useEndpointData('users.info', liveOtherUserStatusText === undefined ? otherUserQuery : null); const roomTopic = liveOtherUserStatusText || data?.user?.statusText || room.topic;