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
34ac7e99
Commit
34ac7e99
authored
Mar 02, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1024
Use sizzle, otherwise we sometimes get null returned.
parent
860befca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
CHANGES.md
CHANGES.md
+7
-2
spec/chatroom.js
spec/chatroom.js
+7
-8
src/converse-muc.js
src/converse-muc.js
+1
-1
No files found.
CHANGES.md
View file @
34ac7e99
...
...
@@ -3,11 +3,16 @@
## 3.3.4 (Unreleased)
-
Avoid
`eval`
(via
`_.template`
from lodash).
-
Bugfix. Avatars weren't being shown.
-
Bugfix. Bookmarks list and open rooms list weren't recreated after logging in for a 2nd time (without reloading the browser).
-
Don't show bookmark toggles when PEP bookmarking not supported by the XMPP server.
-
Add LibreJS support
### Bugfixes
-
Avatars weren't being shown.
-
Bookmarks list and open rooms list weren't recreated after logging in for a 2nd time (without reloading the browser).
-
#1024 null reference on MUC Invite
-
#1025 OTR lock icon disappears
## 3.3.3 (2018-02-14)
### Bugfixes
...
...
spec/chatroom.js
View file @
34ac7e99
...
...
@@ -1423,16 +1423,15 @@
var
from_jid
=
name
.
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
room_jid
=
'
lounge@localhost
'
;
var
reason
=
"
Please join this chat room
"
;
var
message
=
$
(
"
<message from='
"
+
from_jid
+
"
' to='
"
+
_converse
.
bare_jid
+
"
'>
"
+
"
<x xmlns='jabber:x:conference'
"
+
"
jid='
"
+
room_jid
+
"
'
"
+
"
reason='
"
+
reason
+
"
'/>
"
+
"
</message>
"
)[
0
];
expect
(
_converse
.
chatboxes
.
models
.
length
).
toBe
(
1
);
expect
(
_converse
.
chatboxes
.
models
[
0
].
id
).
toBe
(
"
controlbox
"
);
_converse
.
onDirectMUCInvitation
(
message
);
var
stanza
=
Strophe
.
xmlHtmlNode
(
'
<message xmlns="jabber:client" to="
'
+
_converse
.
bare_jid
+
'
" from="
'
+
from_jid
+
'
" id="9bceb415-f34b-4fa4-80d5-c0d076a24231">
'
+
'
<x xmlns="jabber:x:conference" jid="
'
+
room_jid
+
'
" reason="
'
+
reason
+
'
"/>
'
+
'
</message>
'
).
firstChild
;
_converse
.
onDirectMUCInvitation
(
stanza
);
expect
(
window
.
confirm
).
toHaveBeenCalledWith
(
name
+
'
has invited you to join a chat room:
'
+
room_jid
+
'
, and left the following reason: "
'
+
reason
+
'
"
'
);
...
...
src/converse-muc.js
View file @
34ac7e99
...
...
@@ -2839,7 +2839,7 @@
* (XMLElement) message: The message stanza containing the
* invitation.
*/
const
x_el
=
message
.
querySelector
(
'
x[xmlns="jabber:x:conference"]
'
),
const
x_el
=
sizzle
(
'
x[xmlns="jabber:x:conference"]
'
,
message
).
pop
(
),
from
=
Strophe
.
getBareJidFromJid
(
message
.
getAttribute
(
'
from
'
)),
room_jid
=
x_el
.
getAttribute
(
'
jid
'
),
reason
=
x_el
.
getAttribute
(
'
reason
'
);
...
...
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