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
310b2c72
Commit
310b2c72
authored
Mar 01, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1149
With xhr_user_search_url, contact requests are not being sent out
parent
69632f24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
20 deletions
+13
-20
CHANGES.md
CHANGES.md
+1
-0
dist/converse.js
dist/converse.js
+6
-10
src/converse-rosterview.js
src/converse-rosterview.js
+6
-10
No files found.
CHANGES.md
View file @
310b2c72
...
...
@@ -5,6 +5,7 @@
-
Allow setting of debug mode via URL with
`/#converse?debug=true`
-
New config setting
[
locked_muc_domain
](
https://conversejs.org/docs/html/configuration.html#locked-muc-domain
)
-
New config setting
[
show_client_info
](
https://conversejs.org/docs/html/configuration.html#show-client-info
)
-
#1149: With
`xhr_user_search_url`
, contact requests are not being sent out
-
#1213: Switch roster filter input and icons
-
#1373: Re-add support for the
[
muc_domain
](
https://conversejs.org/docs/html/configuration.html#muc-domain
)
setting
-
#1400: When a chat message is just an emoji, enlarge the emoji
...
...
dist/converse.js
View file @
310b2c72
...
...
@@ -59050,14 +59050,16 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
afterRender() {
if (_converse.xhr_user_search_url && _.isString(_converse.xhr_user_search_url)) {
this.initXHRAutoComplete(this.el);
this.el.addEventListener('awesomplete-selectcomplete', ev => {
this.el.querySelector('input[name="name"]').value = ev.text.label;
this.el.querySelector('input[name="jid"]').value = ev.text.value;
});
} else {
this.initJIDAutoComplete(this.el);
}
const jid_input = this.el.querySelector('input[name="jid"]');
this.el.addEventListener('shown.bs.modal', () => {
jid_input.focus();
}, false);
this.el.addEventListener('shown.bs.modal', () => jid_input.focus(), false);
},
initJIDAutoComplete(root) {
...
...
@@ -59067,9 +59069,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
new awesomplete__WEBPACK_IMPORTED_MODULE_3___default.a(jid_input, {
'list': list,
'data': function data(text, input) {
return input.slice(0, input.indexOf("@")) + "@" + text;
},
'data': (text, input) => `${input.slice(0, input.indexOf("@"))}@${text}`,
'filter': awesomplete__WEBPACK_IMPORTED_MODULE_3___default.a.FILTER_STARTSWITH
});
},
...
...
@@ -59100,10 +59100,6 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_5__["default"].plugins
xhr.open("GET", `${_converse.xhr_user_search_url}q=${name_input.value}`, true);
xhr.send();
}, 300));
this.el.addEventListener('awesomplete-selectcomplete', ev => {
jid_input.value = ev.text.value;
name_input.value = ev.text.label;
});
},
addContactFromForm(ev) {
src/converse-rosterview.js
View file @
310b2c72
...
...
@@ -133,13 +133,15 @@ converse.plugins.add('converse-rosterview', {
afterRender
()
{
if
(
_converse
.
xhr_user_search_url
&&
_
.
isString
(
_converse
.
xhr_user_search_url
))
{
this
.
initXHRAutoComplete
(
this
.
el
);
this
.
el
.
addEventListener
(
'
awesomplete-selectcomplete
'
,
ev
=>
{
this
.
el
.
querySelector
(
'
input[name="name"]
'
).
value
=
ev
.
text
.
label
;
this
.
el
.
querySelector
(
'
input[name="jid"]
'
).
value
=
ev
.
text
.
value
;
});
}
else
{
this
.
initJIDAutoComplete
(
this
.
el
);
}
const
jid_input
=
this
.
el
.
querySelector
(
'
input[name="jid"]
'
);
this
.
el
.
addEventListener
(
'
shown.bs.modal
'
,
()
=>
{
jid_input
.
focus
();
},
false
);
this
.
el
.
addEventListener
(
'
shown.bs.modal
'
,
()
=>
jid_input
.
focus
(),
false
);
},
initJIDAutoComplete
(
root
)
{
...
...
@@ -147,9 +149,7 @@ converse.plugins.add('converse-rosterview', {
const
list
=
_
.
uniq
(
_converse
.
roster
.
map
((
item
)
=>
Strophe
.
getDomainFromJid
(
item
.
get
(
'
jid
'
))));
new
Awesomplete
(
jid_input
,
{
'
list
'
:
list
,
'
data
'
:
function
(
text
,
input
)
{
return
input
.
slice
(
0
,
input
.
indexOf
(
"
@
"
))
+
"
@
"
+
text
;
},
'
data
'
:
(
text
,
input
)
=>
`
${
input
.
slice
(
0
,
input
.
indexOf
(
"
@
"
))}
@
${
text
}
`
,
'
filter
'
:
Awesomplete
.
FILTER_STARTSWITH
});
},
...
...
@@ -175,10 +175,6 @@ converse.plugins.add('converse-rosterview', {
xhr
.
open
(
"
GET
"
,
`
${
_converse
.
xhr_user_search_url
}
q=
${
name_input
.
value
}
`
,
true
);
xhr
.
send
()
}
,
300
));
this
.
el
.
addEventListener
(
'
awesomplete-selectcomplete
'
,
(
ev
)
=>
{
jid_input
.
value
=
ev
.
text
.
value
;
name_input
.
value
=
ev
.
text
.
label
;
});
},
addContactFromForm
(
ev
)
{
...
...
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