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

[NEW] Continuous sound notifications for new LiveChat rooms #10151

Merged

Conversation

renatobecker-zz
Copy link

@renatobecker-zz renatobecker-zz commented Mar 15, 2018

@RocketChat/core

Closes #9847

This PR adds a new feature that allows to send continuous sound notifications when a new Livechat message arrives.
This means that the Livechat agent will hear sound notifications while there is a room with at least one unread message.

@engelgabriel engelgabriel requested a deployment to rocket-chat-pr-10151 March 15, 2018 18:48 Abandoned
@renatobecker-zz renatobecker-zz changed the title [NEW]Continuous sound notifications for new LiveChat messages [NEW] Continuous sound notifications for new LiveChat messages Mar 15, 2018
@sampaiodiego sampaiodiego added this to Desireable in 0.64.0 via automation Apr 16, 2018
@sampaiodiego sampaiodiego added this to the 0.64.0 milestone Apr 16, 2018
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

the "new room sound" is playing for every new message (exactly what the setting says) but the issue is talking about playing the "new room sound" continuously only for new rooms and not new messages

@renatobecker-zz
Copy link
Author

@sampaiodiego, thanks for your feedback.
What happened here is that @theorenck and I had a conversation before starting this PR, and at that time, we thought that the "new room sound" notification should be played for each new LiveChat message.
Sorry for my mistake, I'll fix this to work the expected way.

Now the sound notification will be played only in new livechat rooms.
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10151 April 17, 2018 20:53 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10151 April 17, 2018 21:16 Inactive
@renatobecker-zz
Copy link
Author

Fixed PR review.

@theorenck theorenck moved this from Desireable to Ready to merge in 0.64.0 Apr 18, 2018
@theorenck theorenck moved this from Ready to merge to Review/QA in 0.64.0 Apr 19, 2018
const [audio] = $(`audio#${ newRoomNotification }`);
if (audio && audio.play) {
if (unreadAlertCount > 0) {
Meteor.setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

@rocketchat/core does anyone know... If this isn't unset does it keep executing? Or does the meteor wrapper here work just like normal setTimeout?

@ggazzo ggazzo temporarily deployed to rocket-chat-pr-10151 April 21, 2018 04:28 Inactive
@ggazzo ggazzo force-pushed the livechat-continuous-notification-sound-new-messages branch from 532df3d to d5e4e14 Compare April 21, 2018 04:47
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-10151 April 21, 2018 04:48 Inactive
@renatobecker-zz renatobecker-zz changed the title [NEW] Continuous sound notifications for new LiveChat messages [NEW] Continuous sound notifications for new LiveChat rooms Apr 21, 2018
@theorenck theorenck added this to Desirable in May/2018 via automation Apr 23, 2018
@theorenck theorenck removed this from Review/QA in 0.64.0 Apr 23, 2018
@theorenck theorenck moved this from Desirable to Review/QA in May/2018 Apr 23, 2018
@renatobecker-zz
Copy link
Author

There is an issue in this PR that needs to be reviewed.
When a new room is created, the sound notification is played correctly.
But if another room gets focus, even if there are unread rooms, the sound is paused.
So I'm going to work on this to make it work as expected.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10151 April 23, 2018 16:30 Inactive
@renatobecker-zz
Copy link
Author

renatobecker-zz commented Apr 23, 2018

New room sound notification was being paused when any room got focus.
This was happening because of this:

https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-ui/client/lib/notification.js#L123

Now it's fixed.

@theorenck theorenck modified the milestones: 0.64.0, 0.65.0 Apr 25, 2018
@rodrigok rodrigok added this to Desireable in June/2018 via automation May 21, 2018
@rodrigok rodrigok moved this from Desireable to Review/QA in June/2018 May 21, 2018
@rodrigok rodrigok removed this from Review/QA in May/2018 May 21, 2018
@rodrigok rodrigok modified the milestones: 0.65.0, 0.66.0 May 22, 2018
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-10151 May 22, 2018 18:56 Inactive
@ggazzo
Copy link
Member

ggazzo commented May 22, 2018

too* :)

@sampaiodiego sampaiodiego merged commit 80e55cf into develop May 31, 2018
June/2018 automation moved this from Review/QA to Closed May 31, 2018
@sampaiodiego sampaiodiego deleted the livechat-continuous-notification-sound-new-messages branch May 31, 2018 00:57
@ggazzo
Copy link
Member

ggazzo commented May 31, 2018

😘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
June/2018
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

8 participants