diff --git a/js/models.js b/js/models.js index 5afdcb2..a1270d9 100644 --- a/js/models.js +++ b/js/models.js @@ -15,6 +15,8 @@ models.service('models', ['$rootScope', 'colors', function($rootScope, colors) { var title = message['title'] var number = message['number'] var pointer = message['pointers'][0] + var local_variables = message['local_vars']; + var notify = message['notify']; var lines = [] var active = false var notification = 0 @@ -42,6 +44,8 @@ models.service('models', ['$rootScope', 'colors', function($rootScope, colors) { lastSeen: lastSeen, unread: unread, notification: notification, + localvars: local_variables, + notify: notify, } } diff --git a/js/websockets.js b/js/websockets.js index 82c99cc..e8c8667 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -199,12 +199,12 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'models', 'plugins', functi } if (!initial) { - if (!buffer.active && _.contains(message.tags, 'notify_message') && !_.contains(message.tags, 'notify_none')) { + if (!buffer.active && !buffer.notify==0 && _.contains(message.tags, 'notify_message') && !_.contains(message.tags, 'notify_none')) { buffer.unread++; $rootScope.$emit('notificationChanged'); } - if(message.highlight || _.contains(message.tags, 'notify_private') ) { + if(!buffer.notify==0 && message.highlight || _.contains(message.tags, 'notify_private') ) { buffer.notification++; $rootScope.createHighlight(buffer, message); $rootScope.$emit('notificationChanged'); @@ -320,8 +320,8 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers', compression: 'off' })); doSendWithCallback(WeeChatProtocol.formatHdata({ - path: 'buffer:gui_buffers(*)', - keys: ['number,full_name,short_name,title'] + path: 'buffer:gui_buffers(*)', + keys: ['local_variables,notify,number,full_name,short_name,title'] })).then(function(message) { $log.info("Parsing bufinfo"); var bufferInfos = message['objects'][0]['content'];