Do not create a private tab when receiving only a chatstate

This commit is contained in:
mathieui 2011-11-09 14:07:10 +01:00
parent 98b9506983
commit cc7f010aed

View file

@ -560,13 +560,14 @@ class Core(object):
jid = message['from']
nick_from = jid.resource
room_from = jid.bare
body = xhtml.get_body_from_message_stanza(message)
tab = self.get_tab_by_name(jid.full, tabs.PrivateTab) # get the tab with the private conversation
if not tab: # It's the first message we receive: create the tab
if body:
tab = self.open_private_window(room_from, nick_from, False)
if not tab:
return
self.events.trigger('private_msg', message)
body = xhtml.get_body_from_message_stanza(message)
if not body:
return
tab.add_message(body, time=None, nickname=nick_from,