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
c7d5b8b1
Commit
c7d5b8b1
authored
Mar 01, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor to no longer call muc.listRooms. updates #307
parent
79a51212
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
converse.js
converse.js
+12
-6
spec/controlbox.js
spec/controlbox.js
+8
-2
No files found.
converse.js
View file @
c7d5b8b1
...
@@ -1790,9 +1790,16 @@
...
@@ -1790,9 +1790,16 @@
},
},
updateRoomsList
:
function
()
{
updateRoomsList
:
function
()
{
converse
.
connection
.
muc
.
listRooms
(
/* Send and IQ stanza to the server asking for all rooms
this
.
model
.
get
(
'
muc_domain
'
),
*/
$
.
proxy
(
function
(
iq
)
{
// Success
converse
.
connection
.
sendIQ
(
$iq
({
to
:
this
.
model
.
get
(
'
muc_domain
'
),
from
:
converse
.
connection
.
jid
,
type
:
"
get
"
}).
c
(
"
query
"
,
{
xmlns
:
Strophe
.
NS
.
DISCO_ITEMS
}),
// Succcess Handler
$
.
proxy
(
function
(
iq
)
{
var
name
,
jid
,
i
,
fragment
,
var
name
,
jid
,
i
,
fragment
,
that
=
this
,
that
=
this
,
$available_chatrooms
=
this
.
$el
.
find
(
'
#available-chatrooms
'
);
$available_chatrooms
=
this
.
$el
.
find
(
'
#available-chatrooms
'
);
...
@@ -1821,9 +1828,8 @@
...
@@ -1821,9 +1828,8 @@
}
}
return
true
;
return
true
;
},
this
),
},
this
),
$
.
proxy
(
function
(
iq
)
{
// Failure
// Error handler
this
.
informNoRoomsFound
();
$
.
proxy
(
function
(
iq
)
{
this
.
informNoRoomsFound
();
},
this
));
},
this
));
},
},
showRooms
:
function
(
ev
)
{
showRooms
:
function
(
ev
)
{
...
...
spec/controlbox.js
View file @
c7d5b8b1
...
@@ -1005,7 +1005,7 @@
...
@@ -1005,7 +1005,7 @@
expect
(
_
.
isEqual
(
new_attrs
.
sort
(),
old_attrs
.
sort
())).
toEqual
(
true
);
expect
(
_
.
isEqual
(
new_attrs
.
sort
(),
old_attrs
.
sort
())).
toEqual
(
true
);
}
}
},
converse
));
},
converse
));
it
(
"
will show fullname and jid properties on tooltip
"
,
$
.
proxy
(
function
()
{
it
(
"
will show fullname and jid properties on tooltip
"
,
$
.
proxy
(
function
()
{
var
jid
,
name
,
i
,
t
;
var
jid
,
name
,
i
,
t
;
for
(
i
=
0
;
i
<
mock
.
cur_names
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
mock
.
cur_names
.
length
;
i
++
)
{
...
@@ -1019,7 +1019,7 @@
...
@@ -1019,7 +1019,7 @@
expect
(
dd_title
).
toContain
(
jid
);
expect
(
dd_title
).
toContain
(
jid
);
}
}
},
converse
));
},
converse
));
},
converse
));
},
converse
));
},
converse
,
mock
,
test_utils
));
},
converse
,
mock
,
test_utils
));
...
@@ -1112,6 +1112,12 @@
...
@@ -1112,6 +1112,12 @@
expect
(
$
(
'
.chatroom:visible
'
).
length
).
toBe
(
1
);
// There should now be an open chatroom
expect
(
$
(
'
.chatroom:visible
'
).
length
).
toBe
(
1
);
// There should now be an open chatroom
},
converse
));
},
converse
));
},
converse
));
},
converse
));
it
(
"
lists rooms currently on the server
"
,
$
.
proxy
(
function
()
{
// TODO: test updateRoomsList
// See: http://xmpp.org/extensions/xep-0045.html#disco-rooms
},
converse
));
},
converse
));
},
converse
));
},
converse
,
mock
,
test_utils
));
},
converse
,
mock
,
test_utils
));
}));
}));
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