Commit a4779704 authored by JC Brand's avatar JC Brand

Ignore type error messages as headline messages.

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