Commit 0169d86b authored by JC Brand's avatar JC Brand

Re-add check for `allow_non_roster_messaging`

parent dfe9d301
......@@ -845,6 +845,11 @@ converse.plugins.add('converse-chatboxes', {
contact_jid = Strophe.getBareJidFromJid(to_jid);
} else {
contact_jid = from_bare_jid;
await _converse.api.waitUntil('rosterContactsFetched');
const roster_item = _converse.roster.get(contact_jid);
if (_.isUndefined(roster_item) && !_converse.allow_non_roster_messaging) {
return;
}
}
// Get chat box, but only create when the message has something to show to the user
const has_body = sizzle(`body, encrypted[xmlns="${Strophe.NS.OMEMO}"]`, stanza).length > 0,
......
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