Commit 23e9c48e authored by JC Brand's avatar JC Brand

Avoid creating a headlines box...

if we don't have anything to show inside it.

Updates #1221
parent 9cd45866
......@@ -9,6 +9,7 @@
- #1199 Can't get back from to login screen from registration screen
- #1204 Link encoding issue
- #1214 Setting `allow_contact_requests` to `false` has no effect
- #1221 Avoid creating a headlines box if we don't have anything to show inside it
- #1222 Adding a bookmark should prefill the room name
## 4.0.2 (2018-10-02)
......
......@@ -66438,6 +66438,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return;
}
if (_.isNull(message.querySelector('body'))) {
// Avoid creating a chat box if we have nothing to show
// inside it.
return;
}
const chatbox = _converse.chatboxes.create({
'id': from_jid,
'jid': from_jid,
......@@ -71804,7 +71810,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
if (sizzle('item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', iq).length) {
this.feedback.set('error', __(`Error: the groupchat ${this.model.getDisplayName()} does not exist.`));
} else if (sizzle('not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
this.feedback.set('error', __(`Sorry, you're not allowed to registerd in this groupchat`));
this.feedback.set('error', __(`Sorry, you're not allowed to register in this groupchat`));
}
});
}
......@@ -117,6 +117,11 @@
if (_.includes(from_jid, '@') && !_converse.allow_non_roster_messaging) {
return;
}
if (_.isNull(message.querySelector('body'))) {
// Avoid creating a chat box if we have nothing to show
// inside it.
return;
}
const chatbox = _converse.chatboxes.create({
'id': from_jid,
'jid': from_jid,
......
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