]> code.delx.au - pymsnt/blobdiff - src/session.py
Committed Remko's patches (env & typing notification fix)
[pymsnt] / src / session.py
index 42893efef89c9ac73e04657a8ad63c23840bb228..df5557e08dc958aac871a82b91daf92395cfc489 100644 (file)
@@ -180,9 +180,9 @@ class Session(jabw.JabberConnection):
                if avatarHash == " ": # Setting no avatar
                        self.legacycon.updateAvatar() # Default
                elif (not self.avatar) or (self.avatar and self.avatar.getImageHash() != avatarHash):
-                       imageData = self.pytrans.avatarCache.getAvatar(avatarHash)
-                       if imageData:
-                               self.avatar = avatar.Avatar(imageData, self.pytrans.avatarCache) # Stuff in the cache is always PNG
+                       av = self.pytrans.avatarCache.getAvatar(avatarHash)
+                       if av:
+                               self.avatar = av # Stuff in the cache is always PNG
                                self.legacycon.updateAvatar(self.avatar)
                        else:
                                self.doVCardUpdate()
@@ -266,7 +266,10 @@ class Session(jabw.JabberConnection):
                
                elif ptype == "probe":
                        LogEvent(INFO, self.jabberID, "Responding to presence probe")
-                       self.contactList.getContact(to).sendPresence(source)
+                       if to == config.jid:
+                               self.legacycon.sendShowStatus(source)
+                       else:
+                               self.contactList.getContact(to).sendPresence(source)
                else:
                        # Not for groupchat
                        self.handleResourcePresence(source, resource, to, tor, priority, ptype, show, status)