primitivus: improve the check to alert for new message

This commit is contained in:
souliane 2014-08-24 18:23:55 +02:00
commit 4d6d762aa8

View file

@ -405,7 +405,7 @@ class PrimitivusApp(QuickApp, InputHistory):
# presence information and which are not in roster
self.contact_list.replace(from_jid, [C.GROUP_NOT_IN_ROSTER])
if JID(self.contact_list.selected).bare != from_jid.bare:
if self.contact_list.selected is None or JID(self.contact_list.selected).bare != from_jid.bare:
self.contact_list.putAlert(from_jid)
def _dialogOkCb(self, widget, data):