The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/rocketchat-api/server/helpers/composeRoomWithLastMessage.js

8 lines
303 B

import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room, userId) {
if (room.lastMessage) {
room.lastMessage = RocketChat.composeMessageObjectWithUser(room.lastMessage, userId);
}
return room;
});