|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
/* eslint-disable react/display-name */ |
|
|
|
|
import type { IMessage, IRoom, ISubscription } from '@rocket.chat/core-typings'; |
|
|
|
|
import { isDirectMessageRoom, isMultipleDirectMessageRoom, isOmnichannelRoom } from '@rocket.chat/core-typings'; |
|
|
|
|
import { isDirectMessageRoom, isMultipleDirectMessageRoom, isOmnichannelRoom, isVideoConfMessage } from '@rocket.chat/core-typings'; |
|
|
|
|
import { Badge, Sidebar, SidebarItemAction } from '@rocket.chat/fuselage'; |
|
|
|
|
import type { useTranslation } from '@rocket.chat/ui-contexts'; |
|
|
|
|
import { useLayout } from '@rocket.chat/ui-contexts'; |
|
|
|
|
@ -17,6 +17,9 @@ const getMessage = (room: IRoom, lastMessage: IMessage | undefined, t: ReturnTyp |
|
|
|
|
if (!lastMessage) { |
|
|
|
|
return t('No_messages_yet'); |
|
|
|
|
} |
|
|
|
|
if (isVideoConfMessage(lastMessage)) { |
|
|
|
|
return t('Call_started'); |
|
|
|
|
} |
|
|
|
|
if (!lastMessage.u) { |
|
|
|
|
return normalizeSidebarMessage(lastMessage, t); |
|
|
|
|
} |
|
|
|
|
|