Commit c34dcfaa authored by throwaway42's avatar throwaway42 Committed by GitHub

Honor existing mam user configuration #486

parent b07af4c0
......@@ -145,7 +145,7 @@
this.updateSettings({
archived_messages_page_size: '20',
message_archiving: 'never', // Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
message_archiving: undefined, // Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
message_archiving_timeout: 8000, // Time (in milliseconds) to wait before aborting MAM request
});
......@@ -285,7 +285,9 @@
var onFeatureAdded = function (feature) {
var prefs = feature.get('preferences') || {};
if (feature.get('var') === Strophe.NS.MAM && prefs['default'] !== _converse.message_archiving) {
if (feature.get('var') === Strophe.NS.MAM &&
prefs['default'] !== _converse.message_archiving &&
_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