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
7a36acad
Commit
7a36acad
authored
May 17, 2018
by
ChaosKid42
Committed by
JC Brand
May 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove "?" from user-search-query (#1103)
parent
d339a06e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
CHANGES.md
CHANGES.md
+2
-0
docs/source/configuration.rst
docs/source/configuration.rst
+15
-0
src/converse-rosterview.js
src/converse-rosterview.js
+1
-1
No files found.
CHANGES.md
View file @
7a36acad
...
...
@@ -41,6 +41,8 @@
[
statusMessageChanged
](
https://conversejs.org/docs/html/events.html#contactstatusmessagechanged
)
event and make the XMLHttpRequest yourself.
-
Removed
`xhr_user_search`
in favor of only accepting
`xhr_user_search_url`
as configuration option.
-
`xhr_user_search_url`
has to include the
`?`
character now in favor of more
flexibility. See example in the documentation.
-
The data returned from the
`xhr_user_search_url`
must now include the user's
`jid`
instead of just an
`id`
.
-
New configuration settings
[
nickname
](
https://conversejs.org/docs/html/configurations.html#nickname
)
...
...
docs/source/configuration.rst
View file @
7a36acad
...
...
@@ -1587,3 +1587,18 @@ This is the URL to which an XHR GET request will be made to fetch user data from
The query string will be included in the request with ``q`` as its key.
The data returned must be a JSON encoded list of user JIDs.
.. note::
converse.js will construct the XHR get URL by simply appending
``q=<query string entered>`` to the URL given by ``xhr_user_search_url``.
It is therefore important that the necessary question mark (``?``) preceding the
URL's query component or necessary delimiters (``&``) are included. See valid
examples below.
Examples:
.. code-block:: javascript
xhr_user_search_url: 'https://some.url/some_path?',
xhr_user_search_url: 'https://some.url/some_path?api_key=somekey&',
src/converse-rosterview.js
View file @
7a36acad
...
...
@@ -191,7 +191,7 @@
}
};
name_input
.
addEventListener
(
'
input
'
,
_
.
debounce
(()
=>
{
xhr
.
open
(
"
GET
"
,
`
${
_converse
.
xhr_user_search_url
}
?
q=
${
name_input
.
value
}
`
,
true
);
xhr
.
open
(
"
GET
"
,
`
${
_converse
.
xhr_user_search_url
}
q=
${
name_input
.
value
}
`
,
true
);
xhr
.
send
()
}
,
300
));
this
.
el
.
addEventListener
(
'
awesomplete-selectcomplete
'
,
(
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