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
98a70330
Commit
98a70330
authored
Jan 15, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #520.
Two new configuration settings: locked_domain and default_domain.
parent
1884621f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
2 deletions
+33
-2
converse.js
converse.js
+8
-1
docs/CHANGES.md
docs/CHANGES.md
+2
-0
docs/source/configuration.rst
docs/source/configuration.rst
+23
-1
No files found.
converse.js
View file @
98a70330
...
...
@@ -309,12 +309,14 @@
cache_otr_key
:
false
,
csi_waiting_time
:
0
,
// Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
debug
:
false
,
default_domain
:
undefined
,
domain_placeholder
:
__
(
"
e.g. conversejs.org
"
),
// Placeholder text shown in the domain input on the registration form
expose_rid_and_sid
:
false
,
forward_messages
:
false
,
hide_muc_server
:
false
,
hide_offline_users
:
false
,
jid
:
undefined
,
locked_domain
:
undefined
,
keepalive
:
false
,
message_archiving
:
'
never
'
,
// Supported values are 'always', 'never', 'roster' (See https://xmpp.org/extensions/xep-0313.html#prefs )
message_carbons
:
false
,
// Support for XEP-280
...
...
@@ -6015,7 +6017,7 @@
'
label_password
'
:
__
(
'
Password:
'
),
'
label_anon_login
'
:
__
(
'
Click here to log in anonymously
'
),
'
label_login
'
:
__
(
'
Log In
'
),
'
placeholder_username
'
:
__
(
'
user@server
'
),
'
placeholder_username
'
:
(
converse
.
locked_domain
||
converse
.
default_domain
)
&&
__
(
'
Username
'
)
||
__
(
'
user@server
'
),
'
placeholder_password
'
:
__
(
'
password
'
)
})
));
...
...
@@ -6053,6 +6055,11 @@
$pw_input
.
addClass
(
'
error
'
);
}
if
(
errors
)
{
return
;
}
if
(
converse
.
locked_domain
)
{
jid
=
Strophe
.
escapeNode
(
jid
)
+
'
@
'
+
converse
.
locked_domain
;
}
else
if
(
converse
.
default_domain
&&
jid
.
indexOf
(
'
@
'
)
===
-
1
)
{
jid
=
jid
+
'
@
'
+
converse
.
default_domain
;
}
this
.
connect
(
$form
,
jid
,
password
);
return
false
;
},
...
...
docs/CHANGES.md
View file @
98a70330
...
...
@@ -5,6 +5,8 @@
-
#352 When the user has manually scrolled up in a chat window, don't scroll
down on chat event notifications. [jcbrand]
-
#524 Added
`auto_join_on_invite`
parameter for automatically joining chatrooms. [ben]
-
#520 Set specific domain. Two new options
[
default_domain
](
https://conversejs.org/docs/html/configuration.html#default_domain
)
and
[
locked_domain
](
https://conversejs.org/docs/html/configuration.html#locked_domain
)
. [jcbrand]
-
#521 Not sending presence when connecting after disconnection. [jcbrand]
-
#535 Messages not received when room with mixed-case JID is used. [jcbrand]
-
#536 Presence not sent out (in cases where it should) after page refresh. [jcbrand]
...
...
docs/source/configuration.rst
View file @
98a70330
...
...
@@ -319,6 +319,21 @@ debug
If set to true, debugging output will be logged to the browser console.
default_domain
--------------
* Default: ``undefined``
Specify a domain to act as the default for user JIDs. This allows users to log
in with only the username part of their JID, instead of the full JID.
For example, if ``default_domain`` is ``example.org``, then the user:
``johnny@example.org`` can log in with only ``johnny``.
JIDs with other domains are still allowed but need to be provided in full.
To specify only one domain and disallow other domains, see the `locked_domain`_
option.
domain_placeholder
------------------
...
...
@@ -476,7 +491,12 @@ If no locale is matching available locales, the default is ``en``.
Specify the locale/language. The language must be in the ``locales`` object. Refer to
``./locale/locales.js`` to see which locales are supported.
.. _`play-sounds`:
locked_domain
-------------
* Default: ``undefined``
Similar to `default_domain`_ but no other domains are allowed.
ping_interval
-------------
...
...
@@ -489,6 +509,8 @@ You need to set the value to any positive value to enable this functionality.
If you set this value to ``0`` or any negative value, il will disable this functionality.
.. _`play-sounds`:
play_sounds
-----------
...
...
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