Commit ec6b1939 authored by JC Brand's avatar JC Brand

Fixes #486 Update docs and fix failing test.

parent d573efc9
# Changelog
## 2.0.6 (2017-02-01)
- #486 Honor existing mam user configuration [throwaway42]
## 2.0.5 (2017-02-01)
- #743, #751, #753 Update to Strophe 1.2.12. SASL-EXTERNAL now has reduced priority, so it won't
be prioritized above other auth mechanisms. [jcbrand]
......
......@@ -656,13 +656,17 @@ Similar to `default_domain`_ but no other domains are allowed.
message_archiving
-----------------
* Default: ``never``
* Default: ``undefined``
Provides support for `XEP-0313: Message Archive Management <https://xmpp.org/extensions/xep-0313.html>`_,
whereby messages are archived in the XMPP server for later retrieval. Note, your XMPP server must support
XEP-0313 MAM for this to work.
whereby messages are archived in the XMPP server for later retrieval.
Note, your XMPP server must support XEP-0313 MAM for this to work.
This option sets the default archiving preference.
Valid values are ``undefined``, ``never``, ``always`` and ``roster``.
This option sets the default archiving preference. Valid values are ``never``, ``always`` and ``roster``.
``undefined`` means that any existing MAM configuration, as set by the user or
the server administrator, will be used.
``roster`` means that only messages to and from JIDs in your roster will be
archived. The other two values are self-explanatory.
......
......@@ -387,6 +387,7 @@
IQ_id = sendIQ.bind(this)(iq, callback, errback);
});
spyOn(converse, 'onMAMPreferences').andCallThrough();
converse.message_archiving = 'never';
var feature = new converse.Feature({
'var': Strophe.NS.MAM
......@@ -401,7 +402,6 @@
"</iq>"
);
converse.message_archiving = 'never';
/* Example 15. Server responds with current preferences
*
* <iq type='result' id='juliet2'>
......
......@@ -282,7 +282,7 @@
var prefs = feature.get('preferences') || {};
if (feature.get('var') === Strophe.NS.MAM &&
prefs['default'] !== converse.message_archiving &&
converse.message_archiving ) {
!_.isUndefined(converse.message_archiving) ) {
// Ask the server for archiving preferences
converse.connection.sendIQ(
$iq({'type': 'get'}).c('prefs', {'xmlns': Strophe.NS.MAM}),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment