changeset 734:b26dfac8e46c

core: bad indentation in SatPresenceProtocol.available
author souliane <souliane@mailoo.org>
date Sun, 24 Nov 2013 11:15:54 +0100
parents fe05afc3f0df
children 682933ca304c
files src/core/xmpp.py
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/xmpp.py	Fri Dec 13 17:46:35 2013 +0100
+++ b/src/core/xmpp.py	Sun Nov 24 11:15:54 2013 +0100
@@ -323,18 +323,19 @@
             except ValueError:
                 priority = 0
 
-        if not statuses:
+        if statuses is None:
             statuses = {}
-            # default for us is None for wokkel
-            # so we must temporarily switch to wokkel's convention...
-            if 'default' in statuses:
-                statuses[None] = statuses['default']
+
+        # default for us is None for wokkel
+        # so we must temporarily switch to wokkel's convention...
+        if 'default' in statuses:
+            statuses[None] = statuses['default']
 
-            xmppim.PresenceClientProtocol.available(self, entity, show, statuses, priority)
-            presence_elt = xmppim.AvailablePresence(entity, show, statuses, priority)
-            if not self.host.trigger.point("presence_available", presence_elt, self.parent):
-                return
-            self.send(presence_elt)
+        xmppim.PresenceClientProtocol.available(self, entity, show, statuses, priority)
+        presence_elt = xmppim.AvailablePresence(entity, show, statuses, priority)
+        if not self.host.trigger.point("presence_available", presence_elt, self.parent):
+            return
+        self.send(presence_elt)
 
         # ... before switching back
         if None in statuses: