diff --git a/converse.js b/converse.js index 24015d532..6536ace53 100644 --- a/converse.js +++ b/converse.js @@ -206,55 +206,6 @@ }); }; - xmppchat.ClientStorage = Backbone.Model.extend({ - - initialize: function (own_jid) { - this.set({ 'own_jid' : own_jid }); - }, - - addMessage: function (jid, msg, direction) { - var bare_jid = Strophe.getBareJidFromJid(jid), - now = xmppchat.toISOString(new Date()), - msgs = store.get(hex_sha1(this.get('own_jid')+bare_jid)) || []; - if (msgs.length >= 30) { - msgs.shift(); - } - msgs.push(sjcl.encrypt(hex_sha1(this.get('own_jid')), now+' '+direction+' '+msg)); - store.set(hex_sha1(this.get('own_jid')+bare_jid), msgs); - }, - - getMessages: function (jid) { - var bare_jid = Strophe.getBareJidFromJid(jid), - decrypted_msgs = [], i; - var msgs = store.get(hex_sha1(this.get('own_jid')+bare_jid)) || [], - msgs_length = msgs.length; - for (i=0; i