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
8c391fe0
Commit
8c391fe0
authored
Sep 13, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new config setting enable_muc_push
parent
dee10bfe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
CHANGES.md
CHANGES.md
+2
-1
docs/source/configuration.rst
docs/source/configuration.rst
+15
-0
src/converse-push.js
src/converse-push.js
+6
-3
No files found.
CHANGES.md
View file @
8c391fe0
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
## 4.0.1 (Unreleased)
## 4.0.1 (Unreleased)
-
New configuration setting
[
auto_register_muc_nickname
](
https://conversejs.org/docs/html/configuration.html#auto-register-muc-nickname
)
-
New config setting
[
auto_register_muc_nickname
](
https://conversejs.org/docs/html/configuration.html#auto-register-muc-nickname
)
-
New config setting
[
enable_muc_push
](
https://conversejs.org/docs/html/configuration.html#enable-muc-push
)
-
#1182 MUC occupants without nick or JID created
-
#1182 MUC occupants without nick or JID created
-
#1184 Notification error when message has no body
-
#1184 Notification error when message has no body
...
...
docs/source/configuration.rst
View file @
8c391fe0
...
@@ -630,6 +630,21 @@ If you've run ``make dev``, then these files are also available in ``./node_modu
...
@@ -630,6 +630,21 @@ If you've run ``make dev``, then these files are also available in ``./node_modu
which means you can avoid the CDN and host them yourself if you wish.
which means you can avoid the CDN and host them yourself if you wish.
enable_muc_push
---------------
* Default: ``false``
If true, then Converse will try to register
`XEP-0357 push notification App Server(s) <https://xmpp.org/extensions/xep-0357.html#general-architecture>`_
for the MUC domain of any newly entered groupchat.
The app servers are specified with the `push_app_servers`_ option.
.. note::
Registering a push app server against a MUC domain is not (yet) standardized
and this feature should be considered experimental.
expose_rid_and_sid
expose_rid_and_sid
------------------
------------------
...
...
src/converse-push.js
View file @
8c391fe0
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
_converse
.
api
.
settings
.
update
({
_converse
.
api
.
settings
.
update
({
'
push_app_servers
'
:
[],
'
push_app_servers
'
:
[],
'
enable_muc_push
'
:
false
});
});
async
function
disablePushAppServer
(
domain
,
push_app_server
)
{
async
function
disablePushAppServer
(
domain
,
push_app_server
)
{
...
@@ -119,14 +120,16 @@
...
@@ -119,14 +120,16 @@
_converse
.
session
.
save
(
'
push_enabled
'
,
push_enabled
);
_converse
.
session
.
save
(
'
push_enabled
'
,
push_enabled
);
}
}
_converse
.
api
.
listen
.
on
(
'
statusInitialized
'
,
()
=>
enablePush
());
function
onChatBoxAdded
(
model
)
{
function
onChatBoxAdded
(
model
)
{
if
(
model
.
get
(
'
type
'
)
==
_converse
.
CHATROOMS_TYPE
)
{
if
(
model
.
get
(
'
type
'
)
==
_converse
.
CHATROOMS_TYPE
)
{
enablePush
(
Strophe
.
getDomainFromJid
(
model
.
get
(
'
jid
'
)));
enablePush
(
Strophe
.
getDomainFromJid
(
model
.
get
(
'
jid
'
)));
}
}
}
}
if
(
_converse
.
enable_muc_push
)
{
_converse
.
api
.
listen
.
on
(
'
statusInitialized
'
,
()
=>
enablePush
());
_converse
.
api
.
listen
.
on
(
'
chatBoxesInitialized
'
,
()
=>
_converse
.
chatboxes
.
on
(
'
add
'
,
onChatBoxAdded
));
_converse
.
api
.
listen
.
on
(
'
chatBoxesInitialized
'
,
()
=>
_converse
.
chatboxes
.
on
(
'
add
'
,
onChatBoxAdded
));
}
}
}
});
});
}));
}));
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