chore: Update typings on callbacks to accept less than a full room object (#33305)
parent
3a161c4310
commit
f27092b94d
@ -1,7 +1,7 @@ |
||||
import type { IMessage, IRoom } from '@rocket.chat/core-typings'; |
||||
import type { IMessage, IRoom, AtLeast } from '@rocket.chat/core-typings'; |
||||
|
||||
import { settings } from '../../../settings/server'; |
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export const isTheLastMessage = (room: IRoom, message: Pick<IMessage, '_id'>) => |
||||
export const isTheLastMessage = (room: AtLeast<IRoom, 'lastMessage'>, message: Pick<IMessage, '_id'>) => |
||||
settings.get('Store_Last_Message') && (!room.lastMessage || room.lastMessage._id === message._id); |
||||
|
||||
Loading…
Reference in new issue