Do not display the messages with type=headline and an empty body

(thanks, jappix)
This commit is contained in:
mathieui 2013-01-04 10:11:58 +01:00
parent 68c6c06095
commit 15fce04294

View file

@ -2382,7 +2382,7 @@ class Core(object):
body = xhtml.get_body_from_message_stanza(message) body = xhtml.get_body_from_message_stanza(message)
if message['type'] == 'error': if message['type'] == 'error':
return self.information(self.get_error_message(message, deprecated=True), 'Error') return self.information(self.get_error_message(message, deprecated=True), 'Error')
elif message['type'] == 'headline': elif message['type'] == 'headline' and message['body']:
return self.information('%s says: %s' % (message['from'], message['body']), 'Headline') return self.information('%s says: %s' % (message['from'], message['body']), 'Headline')
if not body: if not body:
return return