diff --git a/src/core/xmpp.py b/src/core/xmpp.py index 12420141..000c8e1c 100644 --- a/src/core/xmpp.py +++ b/src/core/xmpp.py @@ -295,7 +295,13 @@ class SatPresenceProtocol(xmppim.PresenceClientProtocol): # now it's time to notify frontends self.host.bridge.presenceUpdate(entity.full(), "unavailable", 0, statuses, self.parent.profile) - def available(self, entity=None, show=None, statuses=None, priority=0): + def available(self, entity=None, show=None, statuses=None, priority=None): + if priority is None: + try: + priority = int(self.host.memory.getParamA("Priority", "Connection", profile_key=self.parent.profile)) + except ValueError: + priority = 0 + if not statuses: statuses = {} # default for us is None for wokkel diff --git a/src/memory/memory.py b/src/memory/memory.py index 1f24fbdf..7603dd3c 100644 --- a/src/memory/memory.py +++ b/src/memory/memory.py @@ -40,6 +40,8 @@ class Params(object): ### TODO: add desciption in params #TODO: move Watched in a plugin + #TODO: when priority is changed, a new presence stanza must be emitted + #TODO: int type (Priority should be int instead of string) default_xml = u""" @@ -48,6 +50,7 @@ class Params(object): +