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/app/api/server/helpers/composeRoomWithLastMessage.js

9 lines
318 B

import { composeMessageObjectWithUser } from '/app/utils';
import { API } from '../api';
API.helperMethods.set('composeRoomWithLastMessage', function _composeRoomWithLastMessage(room, userId) {
if (room.lastMessage) {
room.lastMessage = composeMessageObjectWithUser(room.lastMessage, userId);
}
return room;
});