Remove the forward_messages config option

This commit is contained in:
JC Brand 2019-05-31 16:03:20 +02:00
parent 16567324ef
commit 267fb38e0c
3 changed files with 5 additions and 41 deletions

View File

@ -35,6 +35,8 @@
- Rename `muc_disable_moderator_commands` to [muc_disable_slash_commands](https://conversejs.org/docs/html/configuration.html#muc-disable-slash-commands).
- `_converse.api.archive.query` now returns a Promise instead of accepting a callback functions.
- `_converse.api.disco.supports` now returns a Promise which resolves to a Boolean instead of an Array.
- The `forward_messages` config option (which was set to `false` by default) has been removed.
Use [message_carbons](https://conversejs.org/docs/html/configuration.html#message-carbons) instead.
### API changes

View File

@ -656,24 +656,6 @@ Before version 1.0.3 Converse would ignore received messages if they were
intended for a different resource then the current user had. It was decided to
drop this restriction but leave it configurable.
forward_messages
----------------
* Default: ``false``
If set to ``true``, sent messages will also be forwarded to the sending user's
bare JID (their Jabber ID independent of any chat clients aka resources).
This means that sent messages are visible from all the user's chat clients,
and not just the one from which it was actually sent.
This is especially important for web chat, such as Converse, where each
browser tab functions as a separate chat client, with its own resource.
This feature uses Stanza forwarding, see also `XEP 0297: Stanza Forwarding <http://www.xmpp.org/extensions/xep-0297.html>`_
For an alternative approach, see also `message_carbons`_.
fullname
--------
@ -920,16 +902,12 @@ Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.htm
In order to keep all IM clients for a user engaged in a conversation,
outbound messages are carbon-copied to all interested resources.
This is especially important in webchat, like Converse, where each browser
This is especially important with Converse, where each browser
tab serves as a separate IM client.
Both message_carbons and `forward_messages`_ try to solve the same problem
(showing sent messages in all connected chat clients aka resources), but go about it
in two different ways.
XEP-0280 requires server support, so make sure that message carbons are enabled
on your server.
Message carbons is the XEP (Jabber protocol extension) specifically drafted to
solve this problem, while `forward_messages`_ uses
`stanza forwarding <http://www.xmpp.org/extensions/xep-0297.html>`_
muc_disable_slash_commands
--------------------------

View File

@ -208,7 +208,6 @@ _converse.default_settings = {
debug: false,
default_state: 'online',
expose_rid_and_sid: 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',
idle_presence_timeout: 300, // Seconds after which an idle presence is sent
@ -1815,21 +1814,6 @@ _converse.api = {
*/
'send' (stanza) {
_converse.connection.send(stanza);
if (_converse.forward_messages) {
// Forward the message, so that other connected resources are also aware of it.
_converse.connection.send(
$msg({
'to': _converse.bare_jid,
'type': stanza.getAttribute('type'),
}).c('forwarded', {'xmlns': Strophe.NS.FORWARD})
.c('delay', {
'xmns': Strophe.NS.DELAY,
'stamp': (new Date()).toISOString()
}).up()
.cnode(stanza.tree())
);
}
_converse.api.trigger('send', stanza);
},