X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=update-xmpp-status.py;fp=update-xmpp-status.py;h=7671300582a92b8c852a810deba80e2b8db78e44;hb=6c2af2c9c5122b663be6c92d4804497e4a926377;hp=8c64d5c9464e3c82a3d2572cdd9885463fadc880;hpb=fa9651f7cfbec432ae6748a8586a2612d527bbe8;p=svn42.git diff --git a/update-xmpp-status.py b/update-xmpp-status.py index 8c64d5c..7671300 100755 --- a/update-xmpp-status.py +++ b/update-xmpp-status.py @@ -283,6 +283,7 @@ while True: #sockhandle.send("listen\n") #sockhandle.send("status\n") last_request = (None, None) + not_initial_presence = False while True: line = conn.readline() logging.debug("Got Line: " + line) @@ -298,7 +299,11 @@ while True: continue m = RE_PRESENCE.match(line) if not m is None: - formatAndDistributePresence(m.group(1)) + if not_initial_presence: + formatAndDistributePresence(m.group(1)) + else: + not_initial_presence=True + distributeXmppMsg("Initial Presence received: %s" % m.group(1) ,debug=True) continue m = RE_STATUS.match(line) if not m is None: