diff options
author | Michael Weibel <mweibel@users.noreply.github.com> | 2015-02-27 09:18:19 +0300 |
---|---|---|
committer | Michael Weibel <mweibel@users.noreply.github.com> | 2015-02-27 09:18:19 +0300 |
commit | 1e3d463e51b2853335279016648b8e983e3d3b84 (patch) | |
tree | 3fcae12f27b2342f12f6aa698a7744751f53f7c7 | |
parent | 0b8e96c7c2d4bc0f602c7daeeea1d44b96f67495 (diff) | |
parent | 683f704b676fb05200d555c5da53f09bdff71656 (diff) |
Merge pull request #369 from Sudrien/feature/extend_updateWindowOnAllMessages
Feature/extend update window on all messages
-rw-r--r-- | src/view/pane/message.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/view/pane/message.js b/src/view/pane/message.js index 2e3a851..b4bcbb6 100644 --- a/src/view/pane/message.js +++ b/src/view/pane/message.js @@ -218,11 +218,13 @@ Candy.View.Pane = (function(self, $) { // Check to see if in-core notifications are disabled if(!Candy.Core.getOptions().disableCoreNotifications) { - // Notify the user about a new private message if(Candy.View.getCurrent().roomJid !== roomJid || !self.Window.hasFocus()) { self.Chat.increaseUnreadMessages(roomJid); - if(Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' && !self.Window.hasFocus()) { - self.Chat.Toolbar.playSound(); + if(!self.Window.hasFocus()) { + // Notify the user about a new private message OR on all messages if configured + if(Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' || Candy.View.getOptions().updateWindowOnAllMessages === true) { + self.Chat.Toolbar.playSound(); + } } } } |