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
6e86fe33
Commit
6e86fe33
authored
Aug 13, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1913. Can't connect to non-ascii JID
parent
09371712
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
spec/converse.js
spec/converse.js
+8
-8
src/headless/converse-chat.js
src/headless/converse-chat.js
+1
-1
src/headless/converse-headlines.js
src/headless/converse-headlines.js
+1
-1
src/headless/converse-muc.js
src/headless/converse-muc.js
+1
-1
No files found.
spec/converse.js
View file @
6e86fe33
/* global mock */
/* global mock
, converse
*/
describe
(
"
Converse
"
,
function
()
{
...
...
@@ -277,7 +277,7 @@ describe("Converse", function() {
// Test for one JID
chat
=
await
_converse
.
api
.
chats
.
open
(
jid
);
expect
(
chat
instanceof
Object
).
toBeTruthy
();
expect
(
chat
.
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid
)
}
`
);
expect
(
chat
.
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid
}
`
);
const
view
=
_converse
.
chatboxviews
.
get
(
jid
);
await
u
.
waitUntil
(()
=>
u
.
isVisible
(
view
.
el
));
...
...
@@ -286,8 +286,8 @@ describe("Converse", function() {
await
u
.
waitUntil
(()
=>
_converse
.
chatboxes
.
length
==
3
);
const
list
=
await
_converse
.
api
.
chats
.
get
([
jid
,
jid2
]);
expect
(
Array
.
isArray
(
list
)).
toBeTruthy
();
expect
(
list
[
0
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid
)
}
`
);
expect
(
list
[
1
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid2
)
}
`
);
expect
(
list
[
0
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid
}
`
);
expect
(
list
[
1
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid2
}
`
);
done
();
}));
...
...
@@ -307,7 +307,7 @@ describe("Converse", function() {
chat
=
await
_converse
.
api
.
chats
.
open
(
jid
);
expect
(
chat
instanceof
Object
).
toBeTruthy
();
expect
(
chat
.
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid
)
}
`
);
expect
(
chat
.
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid
}
`
);
expect
(
Object
.
keys
(
chat
),
[
'
close
'
,
'
endOTR
'
,
'
focus
'
,
'
get
'
,
'
initiateOTR
'
,
'
is_chatroom
'
,
'
maximize
'
,
'
minimize
'
,
'
open
'
,
'
set
'
]
...
...
@@ -317,8 +317,8 @@ describe("Converse", function() {
// Test for multiple JIDs
const
list
=
await
_converse
.
api
.
chats
.
open
([
jid
,
jid2
]);
expect
(
Array
.
isArray
(
list
)).
toBeTruthy
();
expect
(
list
[
0
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid
)
}
`
);
expect
(
list
[
1
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
btoa
(
jid2
)
}
`
);
expect
(
list
[
0
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid
}
`
);
expect
(
list
[
1
].
get
(
'
box_id
'
)).
toBe
(
`box-
${
jid2
}
`
);
done
();
}));
});
...
...
@@ -353,7 +353,7 @@ describe("Converse", function() {
expect
(
_converse
.
api
.
settings
.
get
(
'
emoji_categories
'
)?.
food
).
toBe
(
undefined
);
done
();
}));
it
(
"
only overrides the passed in properties
"
,
mock
.
initConverse
([],
{
...
...
src/headless/converse-chat.js
View file @
6e86fe33
...
...
@@ -330,7 +330,7 @@ converse.plugins.add('converse-chat', {
// but we're in embedded mode.
return
;
}
this
.
set
({
'
box_id
'
:
`box-
${
btoa
(
jid
)
}
`
});
this
.
set
({
'
box_id
'
:
`box-
${
jid
}
`
});
this
.
initNotifications
();
this
.
initMessages
();
...
...
src/headless/converse-headlines.js
View file @
6e86fe33
...
...
@@ -66,7 +66,7 @@ converse.plugins.add('converse-headlines', {
initialize
()
{
this
.
initMessages
();
this
.
set
({
'
box_id
'
:
`box-
${
btoa
(
this
.
get
(
'
jid
'
)
)}
`
});
this
.
set
({
'
box_id
'
:
`box-
${
this
.
get
(
'
jid
'
)}
`
});
/**
* Triggered once a {@link _converse.HeadlinesBox} has been created and initialized.
* @event _converse#headlinesBoxInitialized
...
...
src/headless/converse-muc.js
View file @
6e86fe33
...
...
@@ -384,7 +384,7 @@ converse.plugins.add('converse-muc', {
async
initialize
()
{
this
.
initialized
=
u
.
getResolveablePromise
();
this
.
debouncedRejoin
=
debounce
(
this
.
rejoin
,
250
);
this
.
set
(
'
box_id
'
,
`box-
${
btoa
(
this
.
get
(
'
jid
'
)
)}
`
);
this
.
set
(
'
box_id
'
,
`box-
${
this
.
get
(
'
jid
'
)}
`
);
this
.
initNotifications
();
this
.
initMessages
();
this
.
initOccupants
();
...
...
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