From 4c3d3fee3e6905b9026fdf48ff0a9ebe45d03750 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 5 Jan 2014 03:10:57 -0800 Subject: [PATCH] Remove some old console logs --- clientapp/helpers/fetchAvatar.js | 1 - clientapp/helpers/xmppEventHandlers.js | 9 ++++++--- clientapp/models/resource.js | 2 +- clientapp/views/main.js | 1 - package.json | 2 +- public/x-manifest.cache | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/clientapp/helpers/fetchAvatar.js b/clientapp/helpers/fetchAvatar.js index 71c103f..09675ea 100644 --- a/clientapp/helpers/fetchAvatar.js +++ b/clientapp/helpers/fetchAvatar.js @@ -33,7 +33,6 @@ module.exports = function (jid, id, type, source, cb) { } resp = resp.toJSON(); - console.log(JSON.stringify(resp)); type = resp.vCardTemp.photo.type || type; var data = resp.vCardTemp.photo.data; diff --git a/clientapp/helpers/xmppEventHandlers.js b/clientapp/helpers/xmppEventHandlers.js index 18cc54e..02cbd72 100644 --- a/clientapp/helpers/xmppEventHandlers.js +++ b/clientapp/helpers/xmppEventHandlers.js @@ -167,9 +167,15 @@ module.exports = function (client, app) { pres.status = pres.status || ''; pres.priority = pres.priority || 0; + var resource = contact.resources.get(pres.from); if (resource) { pres.from = pres.from.full; + // Explicitly set idleSince to null to clear + // the model's value. + if (!pres.idleSince) { + pres.idleSince = null; + } resource.set(pres); } else { resource = new Resource(pres); @@ -318,14 +324,11 @@ module.exports = function (client, app) { client.on('receipt', function (msg) { msg = msg.toJSON(); - console.log(msg); var contact = me.getContact(msg.from, msg.to); - console.log(contact); if (!contact) return; var original = Message.idLookup(msg.to[msg.type === 'groupchat' ? 'full' : 'bare'], msg.receipt); - console.log(original); if (!original) return; diff --git a/clientapp/models/resource.js b/clientapp/models/resource.js index 1a3bed9..e58349e 100644 --- a/clientapp/models/resource.js +++ b/clientapp/models/resource.js @@ -13,7 +13,7 @@ module.exports = HumanModel.define({ show: ['string', true, ''], priority: ['number', true, 0], chatState: ['string', true, 'gone'], - idleSince: 'date', + idleSince: ['date', false, undefined], discoInfo: 'object', timezoneOffset: 'number' }, diff --git a/clientapp/views/main.js b/clientapp/views/main.js index d17061d..f1af89e 100644 --- a/clientapp/views/main.js +++ b/clientapp/views/main.js @@ -61,7 +61,6 @@ module.exports = HumanView.extend({ handleEmbedClick: function (e) { if (e.shiftKey) { e.preventDefault(); - console.log(e); $(e.currentTarget).toggleClass('collapsed'); } }, diff --git a/package.json b/package.json index 58785a1..7ddb8a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "otalk.im", - "version": "0.0.2", + "version": "0.0.3", "description": "Otalk: WebRTC Enabled XMPP Client, in the Browser", "repository": { "type": "git", diff --git a/public/x-manifest.cache b/public/x-manifest.cache index d76a50b..aab4f10 100644 --- a/public/x-manifest.cache +++ b/public/x-manifest.cache @@ -1,5 +1,5 @@ CACHE MANIFEST -# 0.0.1 1388917749028 +# 0.0.3 1388920243107 CACHE: /app.js