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
9c6c90a4
Commit
9c6c90a4
authored
May 31, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move config settings into the relevant plugins
parent
195a9781
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
57 deletions
+17
-57
docs/source/configuration.rst
docs/source/configuration.rst
+0
-42
src/converse-chatboxes.js
src/converse-chatboxes.js
+3
-1
src/converse-chatview.js
src/converse-chatview.js
+2
-1
src/converse-core.js
src/converse-core.js
+0
-10
src/converse-register.js
src/converse-register.js
+4
-3
src/converse-roster.js
src/converse-roster.js
+6
-0
src/converse-rosterview.js
src/converse-rosterview.js
+2
-0
No files found.
docs/source/configuration.rst
View file @
9c6c90a4
...
...
@@ -711,48 +711,6 @@ Makes sense to set this to ``true`` when also using the non-core
``converse-roomslist`` plugin, which shows a list of currently open (i.e.
"joined") rooms.
include_offline_state
---------------------
* Default: `false`
Originally, converse.js included an `offline` state which the user could
choose (along with `online`, `busy` and `away`).
Eventually it was however decided to remove this state, since the `offline`
state doesn't propagate across tabs like the others do.
What's meant by "propagate across tabs", is that when you set the state to
`offline` in one tab, and you have instances of converse.js open in other tabs
in your browser, then those instances will not have their states changed to
`offline` as well. For the other statees the change is however propagated.
The reason for this is that according to the XMPP spec, there is no `offline`
state. The only defined states are:
* away -- The entity or resource is temporarily away.
* chat -- The entity or resource is actively interested in chattiIng.
* dnd -- The entity or resource is busy (dnd = "Do Not Disturb").
* xa -- The entity or resource is away for an extended period (xa = "eXtended Away").
Read the `relevant section in the XMPP spec <https://xmpp.org/rfcs/rfc6121.html#presence-syntax-children-show>`_
for more info.
What used to happen in converse.js when the `offline` state was chosen, is
that a presence stanza with a `type` of `unavailable` was sent out.
This is actually exactly what happens when you log out of converse.js as well,
with the notable exception that in the `offline` state, the connection is not
terminated. So you can at any time change your state to something else and
start chatting again.
This might be useful to people, however the fact that the `offline` state
doesn't propagate across tabs means that the user experience is inconsistent,
confusing and appears "broken".
If you are however aware of this issue and still want to allow the `offline`
state, then you can set this option to `true` to enable it.
.. _`i18n`:
i18n
...
...
src/converse-chatboxes.js
View file @
9c6c90a4
...
...
@@ -62,7 +62,9 @@
// Refer to docs/source/configuration.rst for explanations of these
// configuration settings.
_converse
.
api
.
settings
.
update
({
auto_join_private_chats
:
[],
'
filter_by_resource
'
:
false
,
'
auto_join_private_chats
'
:
[],
'
forward_messages
'
:
false
,
});
_converse
.
api
.
promises
.
add
([
'
chatBoxesFetched
'
,
...
...
src/converse-chatview.js
View file @
9c6c90a4
...
...
@@ -101,10 +101,11 @@
{
__
}
=
_converse
;
_converse
.
api
.
settings
.
update
({
'
use_emojione
'
:
false
,
'
emojione_image_path
'
:
emojione
.
imagePathPNG
,
'
show_send_button
'
:
false
,
'
show_toolbar
'
:
true
,
'
time_format
'
:
'
HH:mm
'
,
'
use_emojione
'
:
false
,
'
visible_toolbar_buttons
'
:
{
'
call
'
:
false
,
'
clear
'
:
true
,
...
...
src/converse-core.js
View file @
9c6c90a4
...
...
@@ -293,14 +293,12 @@
// Default configuration values
// ----------------------------
this
.
default_settings
=
{
allow_contact_requests
:
true
,
allow_non_roster_messaging
:
false
,
animate
:
true
,
authentication
:
'
login
'
,
// Available values are "login", "prebind", "anonymous" and "external".
auto_away
:
0
,
// Seconds after which user status is set to 'away'
auto_login
:
false
,
// Currently only used in connection with anonymous login
auto_reconnect
:
true
,
auto_subscribe
:
false
,
auto_xa
:
0
,
// Seconds after which user status is set to 'xa'
blacklisted_plugins
:
[],
bosh_service_url
:
undefined
,
...
...
@@ -310,12 +308,8 @@
debug
:
false
,
default_state
:
'
online
'
,
expose_rid_and_sid
:
false
,
filter_by_resource
:
false
,
forward_messages
:
false
,
geouri_regex
:
/https:
\/\/
www.openstreetmap.org
\/
.*#map=
[
0-9
]
+
\/([\-
0-9.
]
+
)\/([\-
0-9.
]
+
)\S
*/g
,
geouri_replacement
:
'
https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2
'
,
hide_offline_users
:
false
,
include_offline_state
:
false
,
jid
:
undefined
,
keepalive
:
true
,
locales_url
:
'
locale/{{{locale}}}/LC_MESSAGES/converse.json
'
,
...
...
@@ -329,15 +323,11 @@
password
:
undefined
,
prebind_url
:
null
,
priority
:
0
,
registration_domain
:
''
,
rid
:
undefined
,
root
:
window
.
document
,
show_only_online_users
:
false
,
show_send_button
:
false
,
sid
:
undefined
,
storage
:
'
session
'
,
strict_plugin_dependencies
:
false
,
synchronize_availability
:
true
,
trusted
:
true
,
view_mode
:
'
overlayed
'
,
// Choices are 'overlayed', 'fullscreen', 'mobile'
websocket_url
:
undefined
,
...
...
src/converse-register.js
View file @
9c6c90a4
...
...
@@ -144,9 +144,10 @@
_converse
.
CONNECTION_STATUS
[
Strophe
.
Status
.
NOTACCEPTABLE
]
=
'
NOTACCEPTABLE
'
;
_converse
.
api
.
settings
.
update
({
allow_registration
:
true
,
domain_placeholder
:
__
(
"
e.g. conversejs.org
"
),
// Placeholder text shown in the domain input on the registration form
providers_link
:
'
https://xmpp.net/directory.php
'
,
// Link to XMPP providers shown on registration page
'
allow_registration
'
:
true
,
'
domain_placeholder
'
:
__
(
"
e.g. conversejs.org
"
),
// Placeholder text shown in the domain input on the registration form
'
providers_link
'
:
'
https://xmpp.net/directory.php
'
,
// Link to XMPP providers shown on registration page
'
registration_domain
'
:
''
});
...
...
src/converse-roster.js
View file @
9c6c90a4
...
...
@@ -22,6 +22,12 @@
const
{
_converse
}
=
this
,
{
__
}
=
_converse
;
_converse
.
api
.
settings
.
update
({
'
allow_contact_requests
'
:
true
,
'
auto_subscribe
'
:
false
,
'
synchronize_availability
'
:
true
,
});
_converse
.
api
.
promises
.
add
([
'
cachedRoster
'
,
'
roster
'
,
...
...
src/converse-rosterview.js
View file @
9c6c90a4
...
...
@@ -80,7 +80,9 @@
_converse
.
api
.
settings
.
update
({
'
allow_chat_pending_contacts
'
:
true
,
'
allow_contact_removal
'
:
true
,
'
hide_offline_users
'
:
false
,
'
roster_groups
'
:
true
,
'
show_only_online_users
'
:
false
,
'
show_toolbar
'
:
true
,
'
xhr_user_search_url
'
:
null
});
...
...
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