From cc7f010aed20c726b69f99b58f9c7578e5ff1dc1 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 9 Nov 2011 14:07:10 +0100 Subject: Do not create a private tab when receiving only a chatstate --- src/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core.py') diff --git a/src/core.py b/src/core.py index e2ba8ce1..f1f48a2b 100644 --- a/src/core.py +++ b/src/core.py @@ -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 - tab = self.open_private_window(room_from, nick_from, False) + 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, -- cgit v1.2.3