From 71ecdb260880c801bd907f9ed1af465f646ba772 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Thu, 8 May 2014 13:24:57 +0200 Subject: [PATCH] Log unhandled events --- js/glowingbear.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 5922cff..bac3f22 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -36,7 +36,7 @@ weechat.filter('irclinky', ['$filter', function($filter) { }; }]); -weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootScope, models, plugins) { +weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', function($rootScope, $log, models, plugins) { var handleBufferClosing = function(message) { var bufferMessage = message.objects[0].content[0]; @@ -205,6 +205,8 @@ weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootSc $rootScope.$on('onMessage', function(event, message) { if (_.has(eventHandlers, message.id)) { eventHandlers[message.id](message); + } else { + $log.debug('Unhandled event received: ' + message.id); } });