Commit d992efc3 authored by JC Brand's avatar JC Brand

Optimization: only query for MAM prefs when necessary

updates #306
parent 393dd615
......@@ -5103,7 +5103,8 @@
},
onFeatureAdded: function (feature) {
if (feature.get('var') == Strophe.NS.MAM) {
var prefs = feature.get('preferences') || {};
if (feature.get('var') == Strophe.NS.MAM && prefs['default'] !== 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