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
f70a3c3e
Commit
f70a3c3e
authored
May 31, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new configuration variable: `default_state`
parent
2805bf80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
docs/CHANGES.md
docs/CHANGES.md
+3
-4
docs/source/configuration.rst
docs/source/configuration.rst
+9
-0
src/converse-core.js
src/converse-core.js
+4
-3
No files found.
docs/CHANGES.md
View file @
f70a3c3e
...
...
@@ -2,15 +2,14 @@
## 1.0.3 (Unreleased)
-
Bugfix. Login form doesn't render after logging out, when
`auto_reconnect = false`
[jcbrand]
-
Bugfix. Login form doesn't render after logging out, when
`auto_reconnect = false`
[jcbrand]
-
Also indicate new day for the first day's messages. [jcbrand]
-
Chat bot messages don't appear when they have the same ids as their commands.
[jcbrand]
-
Chat bot messages don't appear when they have the same ids as their commands. [jcbrand]
-
Updated onDisconnected method to fire disconnected event even if
`auto_reconnect = false`
. [kamranzafar]
-
Bugfix: MAM messages weren't being fetched oldest first. [jcbrand]
-
Add processing hints to chat state notifications [jcbrand]
-
Don't use sound and desktop notifications for OTR messages (when setting up the session) [jcbrand]
-
New config option
[
default_state
](
https://conversejs.org/docs/html/configuration.html#default_state
)
[
jcbrand
]
-
#553 Add processing hints to OTR messages [jcbrand]
-
#650 Don't ignore incoming messages with same JID as current user (might be MAM archived) [jcbrand]
...
...
docs/source/configuration.rst
View file @
f70a3c3e
...
...
@@ -395,6 +395,15 @@ 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.
default_state
-------------
* Default: ``'online'``
The default chat status that the user wil have. If you for example set this to
``'chat'``, then converse.js will send out a presence stanza with ``"show"``
set to ``'chat'`` as soon as you've been logged in.
domain_placeholder
------------------
...
...
src/converse-core.js
View file @
f70a3c3e
...
...
@@ -259,6 +259,7 @@
credentials_url
:
null
,
// URL from where login credentials can be fetched
csi_waiting_time
:
0
,
// Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
debug
:
false
,
default_state
:
'
online
'
,
expose_rid_and_sid
:
false
,
filter_by_resource
:
false
,
forward_messages
:
false
,
...
...
@@ -357,7 +358,7 @@
}
if
(
converse
.
auto_changed_status
===
true
)
{
converse
.
auto_changed_status
=
false
;
converse
.
xmppstatus
.
setStatus
(
'
online
'
);
converse
.
xmppstatus
.
setStatus
(
converse
.
default_state
);
}
};
...
...
@@ -1431,7 +1432,7 @@
constructPresence
:
function
(
type
,
status_message
)
{
if
(
typeof
type
!==
'
string
'
)
{
type
=
this
.
get
(
'
status
'
)
||
'
online
'
;
type
=
this
.
get
(
'
status
'
)
||
converse
.
default_state
;
}
if
(
typeof
status_message
!==
'
string
'
)
{
status_message
=
this
.
get
(
'
status_message
'
);
...
...
@@ -1475,7 +1476,7 @@
},
getStatus
:
function
()
{
return
this
.
get
(
'
status
'
)
||
'
online
'
;
return
this
.
get
(
'
status
'
)
||
converse
.
default_state
;
},
setStatusMessage
:
function
(
status_message
)
{
...
...
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