Commit a4779704 authored by JC Brand's avatar JC Brand

Ignore type error messages as headline messages.

parent 4c6bd1f4
......@@ -129,12 +129,14 @@
var $message = $(message),
from_jid = $message.attr('from');
if ($message.attr('type') === 'headline' ||
// Some servers (I'm looking at you Prosody) don't set the message
// type to "headline" when sending server messages. For now we
// check if an @ signal is included, and if not, we assume it's
// a headline message.
(typeof from_jid !== 'undefined' && from_jid.indexOf('@') === -1)
) {
// Some servers (I'm looking at you Prosody) don't set the message
// type to "headline" when sending server messages. For now we
// check if an @ signal is included, and if not, we assume it's
// a headline message.
( $message.attr('type') !== 'error' &&
typeof from_jid !== 'undefined' &&
from_jid.indexOf('@') === -1
)) {
return true;
}
return false;
......
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