Commit d573efc9 authored by throwaway42's avatar throwaway42 Committed by JC Brand

Honor existing mam user configuration #486

parent e34adf80
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
*/ */
this.updateSettings({ this.updateSettings({
archived_messages_page_size: '20', 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 message_archiving_timeout: 8000, // Time (in milliseconds) to wait before aborting MAM request
}); });
...@@ -280,7 +280,9 @@ ...@@ -280,7 +280,9 @@
var onFeatureAdded = function (evt, feature) { var onFeatureAdded = function (evt, feature) {
var prefs = feature.get('preferences') || {}; 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 // Ask the server for archiving preferences
converse.connection.sendIQ( converse.connection.sendIQ(
$iq({'type': 'get'}).c('prefs', {'xmlns': Strophe.NS.MAM}), $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