Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
14d90bc9
Commit
14d90bc9
authored
Apr 19, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade dependencies to their latest versions
parent
bf6474ff
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
33 deletions
+33
-33
bower.json
bower.json
+10
-10
converse.js
converse.js
+18
-20
docs/CHANGES.rst
docs/CHANGES.rst
+1
-0
spec/controlbox.js
spec/controlbox.js
+1
-1
spec/otr.js
spec/otr.js
+1
-1
tests/utils.js
tests/utils.js
+2
-1
No files found.
bower.json
View file @
14d90bc9
...
...
@@ -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.1
0
"
,
"almond"
:
"~0.2.
9
"
,
"requirejs-text"
:
"~2.0.1
2
"
,
"requirejs-tpl-jcbrand"
:
"*"
,
"momentjs"
:
"~2.6.0"
,
"jquery.browser"
:
"~0.0.6"
...
...
converse.js
View file @
14d90bc9
...
...
@@ -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
...
...
docs/CHANGES.rst
View file @
14d90bc9
...
...
@@ -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)
------------------
...
...
spec/controlbox.js
View file @
14d90bc9
...
...
@@ -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
);
...
...
spec/otr.js
View file @
14d90bc9
...
...
@@ -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
;
...
...
tests/utils.js
View file @
14d90bc9
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment