From 1ec21c2bfd3b1f1a51493ac59bfd0d61b5f294ff Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Thu, 16 Jan 2014 17:11:27 -0500 Subject: [PATCH] metatitle --- public/src/app.js | 3 ++- src/socket.io/meta.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 330f89f524..233d734264 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -421,6 +421,7 @@ var socket, interval: undefined, titles: [] }; + app.alternatingTitle = function (title) { if (typeof title !== 'string') { return; @@ -451,7 +452,7 @@ var socket, url = a.pathname.slice(1); } - socket.emit('meta.buildTitle', url, function(title, numNotifications) { + socket.emit('meta.buildTitle', url, function(err, title, numNotifications) { titleObj.titles[0] = (numNotifications > 0 ? '(' + numNotifications + ') ' : '') + title; app.alternatingTitle(''); }); diff --git a/src/socket.io/meta.js b/src/socket.io/meta.js index f07b079cef..58e0bea56d 100644 --- a/src/socket.io/meta.js +++ b/src/socket.io/meta.js @@ -31,7 +31,7 @@ SocketMeta.reconnected = function(socket) { SocketMeta.buildTitle = function(socket, text, callback) { meta.title.build(text, function(err, title) { - callback(title); + callback(err, title); }); };