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
e9349176
Commit
e9349176
authored
Feb 18, 2016
by
Davide Colombo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add synchronize_availability option
parent
8c06f917
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
docs/CHANGES.md
docs/CHANGES.md
+1
-0
docs/source/configuration.rst
docs/source/configuration.rst
+15
-0
src/converse-core.js
src/converse-core.js
+3
-2
No files found.
docs/CHANGES.md
View file @
e9349176
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
-
#587 Fix issue when logging out with
`auto_logout=true`
[davec82]
-
#587 Fix issue when logging out with
`auto_logout=true`
[davec82]
-
#589 Save scroll position on minimize and restore it on maximize [rlanvin]
-
#589 Save scroll position on minimize and restore it on maximize [rlanvin]
-
#592 Add random resource for
`auto_login`
, add method generateResource to generate random resource [davec82]
-
#592 Add random resource for
`auto_login`
, add method generateResource to generate random resource [davec82]
-
#598 Add option
`synchronize_availability`
[davec82]
## 0.10.1 (2016-02-06)
## 0.10.1 (2016-02-06)
...
...
docs/source/configuration.rst
View file @
e9349176
...
@@ -679,6 +679,21 @@ Data in localStorage on the other hand is kept indefinitely.
...
@@ -679,6 +679,21 @@ Data in localStorage on the other hand is kept indefinitely.
roster contact statuses will not become out of sync in a single session,
roster contact statuses will not become out of sync in a single session,
only across more than one session.
only across more than one session.
synchronize_availability
--------------------
* Default: ``true``
Valid options: ``true``, ``false``, ``a resource name``.
This option lets you synchronize your chat status (`online`, `busy`, `away`) with other chat clients. In other words,
if you change your status to `busy` in a different chat client, your status will change to `busy` in converse.js as well.
If set to ``true``, converse.js will synchronize with all other clients you are logged in with.
If set to ``false``, this feature is disabled.
If set to ``a resource name``, converse.js will synchronize only with a client that has that particular resource assigned to it.
use_otr_by_default
use_otr_by_default
------------------
------------------
...
...
src/converse-core.js
View file @
e9349176
...
@@ -335,6 +335,7 @@
...
@@ -335,6 +335,7 @@
sid
:
undefined
,
sid
:
undefined
,
sounds_path
:
'
/sounds/
'
,
sounds_path
:
'
/sounds/
'
,
storage
:
'
session
'
,
storage
:
'
session
'
,
synchronize_availability
:
true
,
// Set to false to not sync with other clients or with resource name of the particular client that it should synchronize with
use_vcards
:
true
,
use_vcards
:
true
,
visible_toolbar_buttons
:
{
visible_toolbar_buttons
:
{
'
emoticons
'
:
true
,
'
emoticons
'
:
true
,
...
@@ -3310,8 +3311,8 @@
...
@@ -3310,8 +3311,8 @@
status_message
=
$presence
.
find
(
'
status
'
),
status_message
=
$presence
.
find
(
'
status
'
),
contact
=
this
.
get
(
bare_jid
);
contact
=
this
.
get
(
bare_jid
);
if
(
this
.
isSelf
(
bare_jid
))
{
if
(
this
.
isSelf
(
bare_jid
))
{
if
((
converse
.
connection
.
jid
!==
jid
)
&&
(
presence_type
!==
'
unavailable
'
))
{
if
((
converse
.
connection
.
jid
!==
jid
)
&&
(
presence_type
!==
'
unavailable
'
)
&&
(
converse
.
synchronize_availability
===
true
||
converse
.
synchronize_availability
===
resource
)
)
{
// Another resource has changed its status, we'll update ours as well.
// Another resource has changed its status
and synchronize_availability option let to update
, we'll update ours as well.
converse
.
xmppstatus
.
save
({
'
status
'
:
chat_status
});
converse
.
xmppstatus
.
save
({
'
status
'
:
chat_status
});
if
(
status_message
.
length
)
{
converse
.
xmppstatus
.
save
({
'
status_message
'
:
status_message
.
text
()});
}
if
(
status_message
.
length
)
{
converse
.
xmppstatus
.
save
({
'
status_message
'
:
status_message
.
text
()});
}
}
}
...
...
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