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
397927b1
Commit
397927b1
authored
Jul 12, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken tests and update changelog
parent
6af02904
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1166 additions
and
1112 deletions
+1166
-1112
CHANGES.md
CHANGES.md
+3
-1
spec/chatroom.js
spec/chatroom.js
+840
-780
spec/minchats.js
spec/minchats.js
+18
-17
spec/notification.js
spec/notification.js
+68
-66
spec/roomslist.js
spec/roomslist.js
+51
-50
src/converse-muc.js
src/converse-muc.js
+138
-156
tests/utils.js
tests/utils.js
+48
-42
No files found.
CHANGES.md
View file @
397927b1
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
## 3.2.0 (Unreleased)
## 3.2.0 (Unreleased)
-
#866 Add babel in order to support ES2015 syntax
-
All promises are now native (or polyfilled) ES2015 Promises
instead of jQuery's Deferred. [jcbrand]
-
#866 Add babel in order to support ES2015 syntax [jcbrand]
## 3.1.0 (2017-07-05)
## 3.1.0 (2017-07-05)
...
...
spec/chatroom.js
View file @
397927b1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
spec/minchats.js
View file @
397927b1
...
@@ -144,24 +144,25 @@
...
@@ -144,24 +144,25 @@
var
room_jid
=
'
kitchen@conference.shakespeare.lit
'
;
var
room_jid
=
'
kitchen@conference.shakespeare.lit
'
;
test_utils
.
openAndEnterChatRoom
(
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
kitchen
'
,
'
conference.shakespeare.lit
'
,
'
fires
'
);
_converse
,
'
kitchen
'
,
'
conference.shakespeare.lit
'
,
'
fires
'
).
then
(
function
()
{
var
view
=
_converse
.
chatboxviews
.
get
(
room_jid
);
var
view
=
_converse
.
chatboxviews
.
get
(
room_jid
);
view
.
model
.
set
({
'
minimized
'
:
true
});
view
.
model
.
set
({
'
minimized
'
:
true
});
var
contact_jid
=
mock
.
cur_names
[
5
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
message
=
'
fires: Your attention is required
'
;
var
nick
=
mock
.
chatroom_names
[
0
],
msg
=
$msg
({
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
message
).
tree
();
view
.
handleMUCMessage
(
msg
);
var
contact_jid
=
mock
.
cur_names
[
5
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
expect
(
_converse
.
minimized_chats
.
toggleview
.
$
(
'
.unread-message-count
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
var
message
=
'
fires: Your attention is required
'
;
expect
(
_converse
.
minimized_chats
.
toggleview
.
$
(
'
.unread-message-count
'
).
text
()).
toBe
(
'
1
'
);
var
nick
=
mock
.
chatroom_names
[
0
],
done
();
msg
=
$msg
({
});
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
message
).
tree
();
view
.
handleMUCMessage
(
msg
);
expect
(
_converse
.
minimized_chats
.
toggleview
.
$
(
'
.unread-message-count
'
).
is
(
'
:visible
'
)).
toBeTruthy
();
expect
(
_converse
.
minimized_chats
.
toggleview
.
$
(
'
.unread-message-count
'
).
text
()).
toBe
(
'
1
'
);
done
();
}));
}));
});
});
}));
}));
spec/notification.js
View file @
397927b1
...
@@ -43,36 +43,37 @@
...
@@ -43,36 +43,37 @@
function
(
done
,
_converse
)
{
function
(
done
,
_converse
)
{
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
);
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
).
then
(
function
()
{
var
view
=
_converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
var
view
=
_converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
if
(
!
view
.
$el
.
find
(
'
.chat-area
'
).
length
)
{
view
.
renderChatArea
();
}
if
(
!
view
.
$el
.
find
(
'
.chat-area
'
).
length
)
{
view
.
renderChatArea
();
}
var
no_notification
=
false
;
var
no_notification
=
false
;
if
(
typeof
window
.
Notification
===
'
undefined
'
)
{
if
(
typeof
window
.
Notification
===
'
undefined
'
)
{
no_notification
=
true
;
no_notification
=
true
;
window
.
Notification
=
function
()
{
window
.
Notification
=
function
()
{
return
{
return
{
'
close
'
:
function
()
{}
'
close
'
:
function
()
{}
};
};
};
}
;
}
}
spyOn
(
_converse
,
'
showMessageNotification
'
).
and
.
callThrough
();
spyOn
(
_converse
,
'
showMessageNotification
'
).
and
.
callThrough
(
);
spyOn
(
_converse
,
'
areDesktopNotificationsEnabled
'
).
and
.
returnValue
(
true
);
spyOn
(
_converse
,
'
areDesktopNotificationsEnabled
'
).
and
.
returnValue
(
true
);
var
message
=
'
dummy: This message will show a desktop notification
'
;
var
message
=
'
dummy: This message will show a desktop notification
'
;
var
nick
=
mock
.
chatroom_names
[
0
],
var
nick
=
mock
.
chatroom_names
[
0
],
msg
=
$msg
({
msg
=
$msg
({
from
:
'
lounge@localhost/
'
+
nick
,
from
:
'
lounge@localhost/
'
+
nick
,
id
:
(
new
Date
()).
getTime
()
,
id
:
(
new
Date
()).
getTime
()
,
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
message
).
tree
();
}).
c
(
'
body
'
).
t
(
message
).
tree
();
_converse
.
chatboxes
.
onMessage
(
msg
);
// This will emit 'message'
_converse
.
chatboxes
.
onMessage
(
msg
);
// This will emit 'message'
expect
(
_converse
.
areDesktopNotificationsEnabled
).
toHaveBeenCalled
();
expect
(
_converse
.
areDesktopNotificationsEnabled
).
toHaveBeenCalled
();
expect
(
_converse
.
showMessageNotification
).
toHaveBeenCalled
();
expect
(
_converse
.
showMessageNotification
).
toHaveBeenCalled
();
if
(
no_notification
)
{
if
(
no_notification
)
{
delete
window
.
Notification
;
delete
window
.
Notification
;
}
}
done
();
done
(
);
}
);
}));
}));
it
(
"
is shown for headline messages
"
,
it
(
"
is shown for headline messages
"
,
...
@@ -158,43 +159,44 @@
...
@@ -158,43 +159,44 @@
function
(
done
,
_converse
)
{
function
(
done
,
_converse
)
{
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
);
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
).
then
(
function
()
{
_converse
.
play_sounds
=
true
;
_converse
.
play_sounds
=
true
;
spyOn
(
_converse
,
'
playSoundNotification
'
);
spyOn
(
_converse
,
'
playSoundNotification
'
);
var
view
=
_converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
var
view
=
_converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
if
(
!
view
.
$el
.
find
(
'
.chat-area
'
).
length
)
{
view
.
renderChatArea
();
}
if
(
!
view
.
$el
.
find
(
'
.chat-area
'
).
length
)
{
view
.
renderChatArea
();
}
var
text
=
'
This message will play a sound because it mentions dummy
'
;
var
text
=
'
This message will play a sound because it mentions dummy
'
;
var
message
=
$msg
({
var
message
=
$msg
({
from
:
'
lounge@localhost/otheruser
'
,
from
:
'
lounge@localhost/otheruser
'
,
id
:
'
1
'
,
id
:
'
1
'
,
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
text
);
}).
c
(
'
body
'
).
t
(
text
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
expect
(
_converse
.
playSoundNotification
).
toHaveBeenCalled
();
expect
(
_converse
.
playSoundNotification
).
toHaveBeenCalled
();
text
=
"
This message won't play a sound
"
;
text
=
"
This message won't play a sound
"
;
message
=
$msg
({
message
=
$msg
({
from
:
'
lounge@localhost/otheruser
'
,
from
:
'
lounge@localhost/otheruser
'
,
id
:
'
2
'
,
id
:
'
2
'
,
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
text
);
}).
c
(
'
body
'
).
t
(
text
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
expect
(
_converse
.
playSoundNotification
,
1
);
expect
(
_converse
.
playSoundNotification
,
1
);
_converse
.
play_sounds
=
false
;
_converse
.
play_sounds
=
false
;
text
=
"
This message won't play a sound because it is sent by dummy
"
;
text
=
"
This message won't play a sound because it is sent by dummy
"
;
message
=
$msg
({
message
=
$msg
({
from
:
'
lounge@localhost/dummy
'
,
from
:
'
lounge@localhost/dummy
'
,
id
:
'
3
'
,
id
:
'
3
'
,
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
text
);
}).
c
(
'
body
'
).
t
(
text
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
view
.
onChatRoomMessage
(
message
.
nodeTree
);
expect
(
_converse
.
playSoundNotification
,
1
);
expect
(
_converse
.
playSoundNotification
,
1
);
_converse
.
play_sounds
=
false
;
_converse
.
play_sounds
=
false
;
done
();
done
();
});
}));
}));
});
});
});
});
...
...
spec/roomslist.js
View file @
397927b1
...
@@ -94,56 +94,57 @@
...
@@ -94,56 +94,57 @@
.
then
(
function
()
{
.
then
(
function
()
{
var
room_jid
=
'
kitchen@conference.shakespeare.lit
'
;
var
room_jid
=
'
kitchen@conference.shakespeare.lit
'
;
test_utils
.
openAndEnterChatRoom
(
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
kitchen
'
,
'
conference.shakespeare.lit
'
,
'
romeo
'
);
_converse
,
'
kitchen
'
,
'
conference.shakespeare.lit
'
,
'
romeo
'
).
then
(
function
()
{
var
view
=
_converse
.
chatboxviews
.
get
(
room_jid
);
view
.
model
.
set
({
'
minimized
'
:
true
});
var
view
=
_converse
.
chatboxviews
.
get
(
room_jid
);
view
.
model
.
set
({
'
minimized
'
:
true
});
var
contact_jid
=
mock
.
cur_names
[
5
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
contact_jid
=
mock
.
cur_names
[
5
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
nick
=
mock
.
chatroom_names
[
0
];
var
nick
=
mock
.
chatroom_names
[
0
];
view
.
handleMUCMessage
(
view
.
handleMUCMessage
(
$msg
({
$msg
({
from
:
room_jid
+
'
/
'
+
nick
,
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
'
foo
'
).
tree
());
}).
c
(
'
body
'
).
t
(
'
foo
'
).
tree
());
// If the user isn't mentioned, the counter doesn't get incremented, but the text of the room is bold
// If the user isn't mentioned, the counter doesn't get incremented, but the text of the room is bold
var
room_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
var
room_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.available-chatroom
"
"
.available-chatroom
"
);
);
expect
(
_
.
includes
(
room_el
.
classList
,
'
unread-msgs
'
));
expect
(
_
.
includes
(
room_el
.
classList
,
'
unread-msgs
'
));
// If the user is mentioned, the counter also gets updated
// If the user is mentioned, the counter also gets updated
view
.
handleMUCMessage
(
view
.
handleMUCMessage
(
$msg
({
$msg
({
from
:
room_jid
+
'
/
'
+
nick
,
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
'
romeo: Your attention is required
'
).
tree
()
}).
c
(
'
body
'
).
t
(
'
romeo: Your attention is required
'
).
tree
()
);
);
var
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
var
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
1
'
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
1
'
);
view
.
handleMUCMessage
(
view
.
handleMUCMessage
(
$msg
({
$msg
({
from
:
room_jid
+
'
/
'
+
nick
,
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
'
romeo: and another thing...
'
).
tree
()
}).
c
(
'
body
'
).
t
(
'
romeo: and another thing...
'
).
tree
()
);
);
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
2
'
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
2
'
);
// When the chat gets maximized again, the unread indicators are removed
// When the chat gets maximized again, the unread indicators are removed
view
.
model
.
set
({
'
minimized
'
:
false
});
view
.
model
.
set
({
'
minimized
'
:
false
});
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicator
"
);
expect
(
_
.
isNull
(
indicator_el
));
expect
(
_
.
isNull
(
indicator_el
));
room_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.available-chatroom
"
);
room_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.available-chatroom
"
);
expect
(
_
.
includes
(
room_el
.
classList
,
'
unread-msgs
'
)).
toBeFalsy
();
expect
(
_
.
includes
(
room_el
.
classList
,
'
unread-msgs
'
)).
toBeFalsy
();
done
();
done
();
});
});
});
}));
}));
});
});
...
...
src/converse-muc.js
View file @
397927b1
This diff is collapsed.
Click to expand it.
tests/utils.js
View file @
397927b1
...
@@ -86,54 +86,60 @@
...
@@ -86,54 +86,60 @@
this
.
openRoomsPanel
(
_converse
);
this
.
openRoomsPanel
(
_converse
);
var
roomspanel
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
).
roomspanel
;
var
roomspanel
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
).
roomspanel
;
roomspanel
.
$el
.
find
(
'
input.new-chatroom-name
'
).
val
(
room
);
roomspanel
.
$el
.
find
(
'
input.new-chatroom-name
'
).
val
(
room
);
roomspanel
.
$el
.
find
(
'
input.new-chatroom-nick
'
).
val
(
nick
);
roomspanel
.
$el
.
find
(
'
input.new-chatroom-server
'
).
val
(
server
);
roomspanel
.
$el
.
find
(
'
input.new-chatroom-server
'
).
val
(
server
);
roomspanel
.
$el
.
find
(
'
form
'
).
submit
();
roomspanel
.
$el
.
find
(
'
form
'
).
submit
();
this
.
closeControlBox
(
_converse
);
this
.
closeControlBox
(
_converse
);
};
};
utils
.
openAndEnterChatRoom
=
function
(
converse
,
room
,
server
,
nick
)
{
utils
.
openAndEnterChatRoom
=
function
(
converse
,
room
,
server
,
nick
)
{
sinon
.
spy
(
converse
.
connection
,
'
sendIQ
'
);
return
new
Promise
(
function
(
resolve
,
reject
)
{
utils
.
openChatRoom
(
converse
,
room
,
server
);
sinon
.
spy
(
converse
.
connection
,
'
sendIQ
'
);
var
view
=
converse
.
chatboxviews
.
get
((
room
+
'
@
'
+
server
).
toLowerCase
());
utils
.
openChatRoom
(
converse
,
room
,
server
);
var
view
=
converse
.
chatboxviews
.
get
((
room
+
'
@
'
+
server
).
toLowerCase
());
// We pretend this is a new room, so no disco info is returned.
var
IQ_id
=
converse
.
connection
.
sendIQ
.
firstCall
.
returnValue
;
// We pretend this is a new room, so no disco info is returned.
var
features_stanza
=
$iq
({
var
IQ_id
=
converse
.
connection
.
sendIQ
.
firstCall
.
returnValue
;
from
:
'
lounge@localhost
'
,
var
features_stanza
=
$iq
({
'
id
'
:
IQ_id
,
'
from
'
:
'
lounge@localhost
'
,
'
to
'
:
'
dummy@localhost/desktop
'
,
'
id
'
:
IQ_id
,
'
type
'
:
'
error
'
'
to
'
:
'
dummy@localhost/desktop
'
,
}).
c
(
'
error
'
,
{
'
type
'
:
'
cancel
'
})
'
type
'
:
'
error
'
.
c
(
'
item-not-found
'
,
{
'
xmlns
'
:
"
urn:ietf:params:xml:ns:xmpp-stanzas
"
});
}).
c
(
'
error
'
,
{
'
type
'
:
'
cancel
'
})
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
features_stanza
));
.
c
(
'
item-not-found
'
,
{
'
xmlns
'
:
"
urn:ietf:params:xml:ns:xmpp-stanzas
"
});
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
features_stanza
));
// The XMPP server returns the reserved nick for this user.
IQ_id
=
converse
.
connection
.
sendIQ
.
secondCall
.
returnValue
;
utils
.
waitUntil
(
function
()
{
var
stanza
=
$iq
({
return
converse
.
connection
.
sendIQ
.
secondCall
;
'
type
'
:
'
result
'
,
}).
then
(
function
()
{
'
id
'
:
IQ_id
,
// The XMPP server returns the reserved nick for this user.
'
from
'
:
view
.
model
.
get
(
'
jid
'
),
IQ_id
=
converse
.
connection
.
sendIQ
.
secondCall
.
returnValue
;
'
to
'
:
converse
.
connection
.
jid
var
stanza
=
$iq
({
}).
c
(
'
query
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/disco#info
'
,
'
node
'
:
'
x-roomuser-item
'
})
'
type
'
:
'
result
'
,
.
c
(
'
identity
'
,
{
'
category
'
:
'
conference
'
,
'
name
'
:
nick
,
'
type
'
:
'
text
'
});
'
id
'
:
IQ_id
,
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
stanza
));
'
from
'
:
view
.
model
.
get
(
'
jid
'
),
// The user has just entered the room (because join was called)
'
to
'
:
converse
.
connection
.
jid
// and receives their own presence from the server.
}).
c
(
'
query
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/disco#info
'
,
'
node
'
:
'
x-roomuser-item
'
})
// See example 24: http://xmpp.org/extensions/xep-0045.html#enter-pres
.
c
(
'
identity
'
,
{
'
category
'
:
'
conference
'
,
'
name
'
:
nick
,
'
type
'
:
'
text
'
});
var
presence
=
$pres
({
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
stanza
));
to
:
converse
.
connection
.
jid
,
// The user has just entered the room (because join was called)
from
:
room
+
'
@
'
+
server
+
'
/
'
+
nick
,
// and receives their own presence from the server.
id
:
'
DC352437-C019-40EC-B590-AF29E879AF97
'
// See example 24: http://xmpp.org/extensions/xep-0045.html#enter-pres
}).
c
(
'
x
'
).
attrs
({
xmlns
:
'
http://jabber.org/protocol/muc#user
'
})
var
presence
=
$pres
({
.
c
(
'
item
'
).
attrs
({
to
:
converse
.
connection
.
jid
,
affiliation
:
'
member
'
,
from
:
room
+
'
@
'
+
server
+
'
/
'
+
nick
,
jid
:
converse
.
bare_jid
,
id
:
'
DC352437-C019-40EC-B590-AF29E879AF97
'
role
:
'
occupant
'
}).
c
(
'
x
'
).
attrs
({
xmlns
:
'
http://jabber.org/protocol/muc#user
'
})
}).
up
()
.
c
(
'
item
'
).
attrs
({
.
c
(
'
status
'
).
attrs
({
code
:
'
110
'
});
affiliation
:
'
member
'
,
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
presence
));
jid
:
converse
.
bare_jid
,
converse
.
connection
.
sendIQ
.
restore
();
role
:
'
occupant
'
}).
up
()
.
c
(
'
status
'
).
attrs
({
code
:
'
110
'
});
converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
presence
));
converse
.
connection
.
sendIQ
.
restore
();
resolve
();
});
});
};
};
utils
.
clearBrowserStorage
=
function
()
{
utils
.
clearBrowserStorage
=
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