From 7aa78952087431b7d427114b644b9dc10b1a413a Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 31 Mar 2014 15:22:35 +0200 Subject: [PATCH] quick frontends: first connection fixes --- frontends/src/quick_frontend/quick_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontends/src/quick_frontend/quick_app.py b/frontends/src/quick_frontend/quick_app.py index 113caa53..67596bb9 100644 --- a/frontends/src/quick_frontend/quick_app.py +++ b/frontends/src/quick_frontend/quick_app.py @@ -318,15 +318,15 @@ class QuickApp(object): if show != 'unavailable': #FIXME: must be moved in a plugin - if from_jid.bare in self.profiles[profile]['watched'] and not from_jid.bare in self.profiles[profile]['onlineContact']: + if from_jid.bare in self.profiles[profile].get('watched',[]) and not from_jid.bare in self.profiles[profile]['onlineContact']: self.showAlert(_("Watched jid [%s] is connected !") % from_jid.bare) presences[jabber_id] = {'show': show, 'priority': priority, 'statuses': statuses} - self.profiles[profile]['onlineContact'].add(from_jid) # FIXME onlineContact is useless with CM, must be removed + self.profiles[profile].setdefault('onlineContact',set()).add(from_jid) # FIXME onlineContact is useless with CM, must be removed #TODO: vcard data (avatar) - if show == "unavailable" and from_jid in self.profiles[profile]['onlineContact']: + if show == "unavailable" and from_jid in self.profiles[profile].get('onlineContact',set()): try: del presences[jabber_id] except KeyError: