Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion example-build-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ DEPLOY_DIR=/var/www/rocket.chat

### BUILD
meteor npm install
meteor npm run postinstall

# on the very first build, meteor build command should fail due to a bug on emojione package (related to phantomjs installation)
# the command below forces the error to happen before build command (not needed on subsequent builds)
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-lib/server/lib/roomTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ RocketChat.roomTypes = new class roomTypesServer extends RoomTypesCommon {
return this.roomTypes[roomType] && this.roomTypes[roomType].roomFind;
}

getRoomName(roomType, roomData) {
return this.roomTypes[roomType] && this.roomTypes[roomType].roomName && this.roomTypes[roomType].roomName(roomData);
}

/**
* Run the publish for a room type
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/lib/sendEmailOnMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import s from 'underscore.string';
function getEmailContent({ messageContent, message, user, room }) {
const lng = user && user.language || RocketChat.settings.get('language') || 'en';

const roomName = s.escapeHTML(`#${ RocketChat.settings.get('UI_Allow_room_names_with_special_chars') ? room.fname || room.name : room.name }`);
const roomName = s.escapeHTML(`#${ RocketChat.roomTypes.getRoomName(room.t, room) }`);

const userName = s.escapeHTML(RocketChat.settings.get('UI_Use_Real_Name') ? message.u.name || message.u.username : message.u.username);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ RocketChat.callbacks.add('afterSaveMessage', function(message, room, userId) {
let push_room = '';
if (RocketChat.settings.get('Push_show_username_room')) {
push_username = user.username;
push_room = `#${ room.name }`;
push_room = `#${ RocketChat.roomTypes.getRoomName(room.t, room) }`;
}

if (room.t == null || room.t === 'd') {
Expand Down