diff --git a/chat.js b/chat.js index b6ae5a7e7..382664c24 100644 --- a/chat.js +++ b/chat.js @@ -24,6 +24,7 @@ var xmppchat = (function (jarnxmpp, $, console) { ob.Presence = jarnxmpp.Presence || {}; ob.Messages.ClientStorage = (function () { + // TODO: Messages must be encrypted with a key and salt methods = {}; methods.addMessage = function (jid, msg, direction) { @@ -86,14 +87,6 @@ var xmppchat = (function (jarnxmpp, $, console) { }); }; - ob.Presence.getOwnStatus = function () { - return xmppchat.Storage.get(xmppchat.username+'-xmpp-status'); - }; - - ob.Presence.onlineCount = function () { - return xmppchat.ChatPartners.getTotal(); - }; - ob.Taskbuffer = (function ($) { // Executes tasks one after another (i.e next task is started only when // the previous one has been completed). @@ -723,6 +716,16 @@ xmppchat.RosterClass = (function (stropheRoster, _, $, console) { if (item) { return _.size(item.get('resources')); } + }, + + getNumOnlineContacts: function () { + var count = 0; + for (var i=0; i