Upgrade dependencies to their latest versions
This commit is contained in:
parent
bf6474ff6d
commit
14d90bc99c
20
bower.json
20
bower.json
|
@ -12,18 +12,18 @@
|
|||
"jquery": "1.11.0",
|
||||
"jed": "0.5.4",
|
||||
"tinysort": "git://github.com/Sjeiti/TinySort.git",
|
||||
"underscore": "1.5.1",
|
||||
"backbone": "1.0.0",
|
||||
"backbone.localStorage": "1.1.6",
|
||||
"strophe": "https://github.com/jcbrand/strophejs.git#converse",
|
||||
"strophe.roster": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/roster/strophe.roster.js",
|
||||
"strophe.vcard": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/vcard/strophe.vcard.js",
|
||||
"strophe.disco": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/disco/strophe.disco.js",
|
||||
"strophe.muc": "https://raw.github.com/strophe/strophejs-plugins/02310ad1b8da2962cd05b0f4bceaecca134efed4/muc/strophe.muc.js",
|
||||
"underscore": "1.6.0",
|
||||
"backbone": "1.1.2",
|
||||
"backbone.localStorage": "1.1.7",
|
||||
"strophe": "git@github.com:strophe/strophejs-bower.git#v1.1.3",
|
||||
"strophe.roster": "https://raw.github.com/strophe/strophejs-plugins/b1f364eb6e854ffe844c57add38e885cfeb9b498/roster/strophe.roster.js",
|
||||
"strophe.vcard": "https://raw.github.com/strophe/strophejs-plugins/f5c9e16b463610d501591452cded0359f53aae48/vcard/strophe.vcard.js",
|
||||
"strophe.disco": "https://raw.github.com/jcbrand/strophejs-plugins/75c8693992bc357c699b6d615eeb396e799f5c02/disco/strophe.disco.js",
|
||||
"strophe.muc": "https://raw.github.com/strophe/strophejs-plugins/02310ad1b8da2962cd05b0f4bceaecca134efed4/muc/strophe.muc.js",
|
||||
"otr": "0.2.12",
|
||||
"crypto-js-evanvosberg": "~3.1.2",
|
||||
"almond": "~0.2.6",
|
||||
"requirejs-text": "~2.0.10",
|
||||
"almond": "~0.2.9",
|
||||
"requirejs-text": "~2.0.12",
|
||||
"requirejs-tpl-jcbrand": "*",
|
||||
"momentjs": "~2.6.0",
|
||||
"jquery.browser": "~0.0.6"
|
||||
|
|
38
converse.js
38
converse.js
|
@ -477,7 +477,7 @@
|
|||
|
||||
this.initStatus = function (callback) {
|
||||
this.xmppstatus = new this.XMPPStatus();
|
||||
var id = hex_sha1('converse.xmppstatus-'+this.bare_jid);
|
||||
var id = b64_sha1('converse.xmppstatus-'+this.bare_jid);
|
||||
this.xmppstatus.id = id; // This appears to be necessary for backbone.localStorage
|
||||
this.xmppstatus.localStorage = new Backbone.LocalStorage(id);
|
||||
this.xmppstatus.fetch({success: callback, error: callback});
|
||||
|
@ -508,7 +508,7 @@
|
|||
// Set up the roster
|
||||
this.roster = new this.RosterItems();
|
||||
this.roster.localStorage = new Backbone.LocalStorage(
|
||||
hex_sha1('converse.rosteritems-'+converse.bare_jid));
|
||||
b64_sha1('converse.rosteritems-'+converse.bare_jid));
|
||||
this.registerRosterHandler();
|
||||
this.registerRosterXHandler();
|
||||
this.registerPresenceHandler();
|
||||
|
@ -607,7 +607,7 @@
|
|||
// A model for managing OTR settings.
|
||||
getSessionPassphrase: function () {
|
||||
if (converse.prebind) {
|
||||
var key = hex_sha1(converse.connection.jid),
|
||||
var key = b64_sha1(converse.connection.jid),
|
||||
pass = window.sessionStorage[key];
|
||||
if (typeof pass === 'undefined') {
|
||||
pass = Math.floor(Math.random()*4294967295).toString();
|
||||
|
@ -627,10 +627,10 @@
|
|||
var pass = this.getSessionPassphrase();
|
||||
if (typeof pass !== "undefined") {
|
||||
// Encrypt the key and set in sessionStorage. Also store instance tag.
|
||||
window.sessionStorage[hex_sha1(jid+'priv_key')] =
|
||||
window.sessionStorage[b64_sha1(jid+'priv_key')] =
|
||||
cipher.encrypt(CryptoJS.algo.AES, key.packPrivate(), pass).toString();
|
||||
window.sessionStorage[hex_sha1(jid+'instance_tag')] = instance_tag;
|
||||
window.sessionStorage[hex_sha1(jid+'pass_check')] =
|
||||
window.sessionStorage[b64_sha1(jid+'instance_tag')] = instance_tag;
|
||||
window.sessionStorage[b64_sha1(jid+'pass_check')] =
|
||||
cipher.encrypt(CryptoJS.algo.AES, 'match', pass).toString();
|
||||
}
|
||||
}
|
||||
|
@ -650,10 +650,10 @@
|
|||
if (this.get('box_id') !== 'controlbox') {
|
||||
this.messages = new converse.Messages();
|
||||
this.messages.localStorage = new Backbone.LocalStorage(
|
||||
hex_sha1('converse.messages'+this.get('jid')+converse.bare_jid));
|
||||
b64_sha1('converse.messages'+this.get('jid')+converse.bare_jid));
|
||||
this.save({
|
||||
'user_id' : Strophe.getNodeFromJid(this.get('jid')),
|
||||
'box_id' : hex_sha1(this.get('jid')),
|
||||
'box_id' : b64_sha1(this.get('jid')),
|
||||
'otr_status': this.get('otr_status') || UNENCRYPTED,
|
||||
'minimized': this.get('minimized') || false,
|
||||
'time_minimized': this.get('time_minimized') || converse.toISOString(new Date()),
|
||||
|
@ -670,9 +670,9 @@
|
|||
if (converse.cache_otr_key) {
|
||||
pass = converse.otr.getSessionPassphrase();
|
||||
if (typeof pass !== "undefined") {
|
||||
instance_tag = window.sessionStorage[hex_sha1(this.id+'instance_tag')];
|
||||
saved_key = window.sessionStorage[hex_sha1(this.id+'priv_key')];
|
||||
pass_check = window.sessionStorage[hex_sha1(this.connection.jid+'pass_check')];
|
||||
instance_tag = window.sessionStorage[b64_sha1(this.id+'instance_tag')];
|
||||
saved_key = window.sessionStorage[b64_sha1(this.id+'priv_key')];
|
||||
pass_check = window.sessionStorage[b64_sha1(this.connection.jid+'pass_check')];
|
||||
if (saved_key && instance_tag && typeof pass_check !== 'undefined') {
|
||||
var decrypted = cipher.decrypt(CryptoJS.algo.AES, saved_key, pass);
|
||||
var key = DSA.parsePrivate(decrypted.toString(CryptoJS.enc.Latin1));
|
||||
|
@ -1055,7 +1055,8 @@
|
|||
if (match) {
|
||||
if (match[1] === "clear") {
|
||||
this.$el.find('.chat-content').empty();
|
||||
this.model.messages.reset().localStorage._clear();
|
||||
this.model.messages.reset();
|
||||
this.model.messages.localStorage._clear();
|
||||
return;
|
||||
}
|
||||
else if (match[1] === "help") {
|
||||
|
@ -1753,7 +1754,7 @@
|
|||
'name': Strophe.unescapeNode(Strophe.getNodeFromJid(jid)),
|
||||
'nick': nick,
|
||||
'chatroom': true,
|
||||
'box_id' : hex_sha1(jid)
|
||||
'box_id' : b64_sha1(jid)
|
||||
});
|
||||
if (!chatroom.get('connected')) {
|
||||
converse.chatboxviews.get(jid).connect(null);
|
||||
|
@ -2382,7 +2383,7 @@
|
|||
|
||||
onConnected: function () {
|
||||
this.localStorage = new Backbone.LocalStorage(
|
||||
hex_sha1('converse.chatboxes-'+converse.bare_jid));
|
||||
b64_sha1('converse.chatboxes-'+converse.bare_jid));
|
||||
if (!this.get('controlbox')) {
|
||||
this.add({
|
||||
id: 'controlbox',
|
||||
|
@ -2988,11 +2989,8 @@
|
|||
},
|
||||
|
||||
removeRosterItemView: function (item) {
|
||||
var view = this.get(item.id);
|
||||
if (view) {
|
||||
view.$el.remove();
|
||||
delete this.get(item.id);
|
||||
this.render();
|
||||
if (this.get(item.id)) {
|
||||
this.get(item.id).remove();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
@ -3279,7 +3277,7 @@
|
|||
model: converse.Feature,
|
||||
initialize: function () {
|
||||
this.localStorage = new Backbone.LocalStorage(
|
||||
hex_sha1('converse.features'+converse.bare_jid));
|
||||
b64_sha1('converse.features'+converse.bare_jid));
|
||||
if (this.localStorage.records.length === 0) {
|
||||
// localStorage is empty, so we've likely never queried this
|
||||
// domain for features yet
|
||||
|
|
|
@ -6,6 +6,7 @@ Changelog
|
|||
|
||||
* Chat boxes and rooms can now be resized vertically. [jcbrand]
|
||||
* Chat boxes and rooms can be minimized. [jcbrand]
|
||||
* Upgraded many dependencies to their latest versions. [jcrand]
|
||||
|
||||
0.7.4 (2014-03-05)
|
||||
------------------
|
||||
|
|
|
@ -447,7 +447,7 @@
|
|||
expect(new_roster.length).toEqual(0);
|
||||
|
||||
new_roster.localStorage = new Backbone.LocalStorage(
|
||||
hex_sha1('converse.rosteritems-dummy@localhost'));
|
||||
b64_sha1('converse.rosteritems-dummy@localhost'));
|
||||
|
||||
new_roster.fetch();
|
||||
expect(this.roster.length).toEqual(num_contacts);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
expect(pp).not.toBe(this.connection.pass);
|
||||
expect(window.sessionStorage.length).toBe(1);
|
||||
expect(window.localStorage.length).toBe(0);
|
||||
expect(pp).toBe(window.sessionStorage[hex_sha1(converse.connection.jid)]);
|
||||
expect(pp).toBe(window.sessionStorage[b64_sha1(converse.connection.jid)]);
|
||||
|
||||
// Clean up
|
||||
this.prebind = false;
|
||||
|
|
|
@ -93,7 +93,8 @@
|
|||
utils.clearChatBoxMessages = function (jid) {
|
||||
var view = converse.chatboxviews.get(jid);
|
||||
view.$el.find('.chat-content').empty();
|
||||
view.model.messages.reset().localStorage._clear();
|
||||
view.model.messages.reset();
|
||||
view.model.messages.localStorage._clear();
|
||||
};
|
||||
|
||||
utils.createCurrentContacts = function () {
|
||||
|
|
Loading…
Reference in New Issue
Block a user