-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update typings on callbacks to accept less than a full room ob…
…ject (#33305)
- Loading branch information
Showing
4 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
3 changes: 2 additions & 1 deletion
3
apps/meteor/server/services/messages/hooks/BeforeFederationActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters