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
fbf2e56b
Commit
fbf2e56b
authored
Dec 03, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
converse-muc: Cache the room configuration on the Backbone.Model object
parent
6379676c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
224 additions
and
69 deletions
+224
-69
spec/chatroom.js
spec/chatroom.js
+6
-4
src/converse-muc.js
src/converse-muc.js
+218
-65
No files found.
spec/chatroom.js
View file @
fbf2e56b
...
...
@@ -246,7 +246,7 @@
it
(
"
can be configured if you're its owner
"
,
mock
.
initConverse
(
function
(
converse
)
{
converse_api
.
rooms
.
open
(
'
room@conference.example.org
'
,
{
'
nick
'
:
'
some1
'
});
var
view
=
converse
.
chatboxviews
.
get
(
'
room@conference.example.org
'
);
spyOn
(
view
,
'
showConfigureButtonIfRoomOwner
'
).
andCallThrough
();
spyOn
(
view
,
'
findAndSaveOwnAffiliation
'
).
andCallThrough
();
/* <presence to="dummy@localhost/converse.js-29092160"
* from="room@conference.example.org/some1">
...
...
@@ -267,7 +267,7 @@
}).
up
()
.
c
(
'
status
'
,
{
code
:
'
110
'
});
converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
expect
(
view
.
showConfigureButtonIfRoomOwner
).
toHaveBeenCalled
();
expect
(
view
.
findAndSaveOwnAffiliation
).
toHaveBeenCalled
();
expect
(
view
.
$
(
'
.configure-chatroom-button
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
expect
(
view
.
$
(
'
.toggle-chatbox-button
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
expect
(
view
.
$
(
'
.toggle-bookmark
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
...
...
@@ -738,9 +738,10 @@
* type='unavailable'>
* <x xmlns='http://jabber.org/protocol/muc#user'>
* <item affiliation='none' role='none'>
* <actor nick='Fluellen'/>
* <reason>Avaunt, you cullion!</reason>
*
<actor nick='Fluellen'/>
*
<reason>Avaunt, you cullion!</reason>
* </item>
* <status code='110'/>
* <status code='307'/>
* </x>
* </presence>
...
...
@@ -760,6 +761,7 @@
.
c
(
'
actor
'
).
attrs
({
nick
:
'
Fluellen
'
}).
up
()
.
c
(
'
reason
'
).
t
(
'
Avaunt, you cullion!
'
).
up
()
.
up
()
.
c
(
'
status
'
).
attrs
({
code
:
'
110
'
}).
up
()
.
c
(
'
status
'
).
attrs
({
code
:
'
307
'
}).
nodeTree
;
var
view
=
converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
...
...
src/converse-muc.js
View file @
fbf2e56b
This diff is collapsed.
Click to expand it.
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