Commit d42b8727 authored by JC Brand's avatar JC Brand

Check if room supports MAM before qyerying

instead of wrongly checking the bare JID
parent 776f49d5
......@@ -153,7 +153,9 @@
*/
if (this.disable_mam) { return; }
const { _converse } = this.__super__;
_converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid).then(
const mam_jid = this.model.get('type') === CHATROOMS_TYPE ? this.model.get('jid') : _converse.bare_jid;
_converse.api.disco.supports(Strophe.NS.MAM, mam_jid).then(
(results) => { // Success
if (results.length) {
const most_recent_msg = utils.getMostRecentMessage(this.model);
......
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