Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Undefined room name in push and e-mail notifications #10318

Conversation

renatobecker-zz
Copy link

@renatobecker-zz renatobecker-zz commented Apr 3, 2018

@RocketChat/core

Closes #3201
Closes #9341

When an agent goes offline and the visitor continues to send messages, push and e-mail notifications are sent to the agent using the name of the room.
Since the Livechat rooms don't use the name prop, this PR fixes the issue using the getRoomName method.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10318 April 3, 2018 19:54 Inactive
@renatobecker-zz renatobecker-zz changed the title [FIX] Undefined room name in push and e-mail notifications when the agent goes offline [FIX] Undefined room name in push and e-mail notifications Apr 3, 2018
@sampaiodiego sampaiodiego added this to the 0.64.0 milestone Apr 3, 2018
@@ -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 = `#${ RocketChat.settings.get('UI_Allow_room_names_with_special_chars') ? room.fname || room.name : room.name }`;
const roomName = `#${ (RocketChat.settings.get('UI_Allow_room_names_with_special_chars') && room.fname) ? room.fname : RocketChat.roomTypes.getRoomName(room.t, room) }`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not needed anymore to test for UI_Allow_room_names_with_special_chars setting here. this test is done on implementations of getRoomName (like this)..

@theorenck theorenck modified the milestones: 0.64.0, 0.65.0 Apr 25, 2018
@theorenck theorenck added this to Desireable in 0.64.0 via automation Apr 25, 2018
@theorenck theorenck added this to Desirable in May/2018 via automation Apr 25, 2018
@theorenck theorenck removed this from Desireable in 0.64.0 Apr 25, 2018
@theorenck theorenck moved this from Desirable to Review/QA in May/2018 Apr 25, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10318 April 26, 2018 15:47 Inactive
…otifications

# Conflicts:
#	packages/rocketchat-lib/server/lib/sendEmailOnMessage.js
May/2018 automation moved this from Review/QA to Done May 9, 2018
@rodrigok rodrigok deleted the undefined-room-name-livechat-push-email-notifications branch May 11, 2018 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
May/2018
  
Done
6 participants