]> code.delx.au - pymsnt/blobdiff - src/session.py
Use md5 hashes for spool dir. Moved avatar dir to root of spool dir.
[pymsnt] / src / session.py
index 19dfd305e72ce2af3adaea79ea2a7c7aaa0db212..f4d11bd629650f682ab478cb6e509c249117a281 100644 (file)
@@ -329,11 +329,14 @@ class Session(jabw.JabberConnection):
                del self.resourceList[resource]
                self.legacycon.resourceOffline(resource)
        
-       def subscriptionReceived(self, to, subtype):
+       def subscriptionReceived(self, fro, to, subtype):
                """ Sends the subscription request to the legacy services handler """
                if to.find('@') > 0:
-                       LogEvent(INFO, self.jabberID, "Passing subscription to legacy service.")
-                       self.contactList.jabberSubscriptionReceived(to, subtype)
+                       if self.ready:
+                               LogEvent(INFO, self.jabberID, "Passing subscription to legacy service.")
+                               self.contactList.jabberSubscriptionReceived(to, subtype)
+                       else:
+                               self.sendPresence(fro, to, ptype="error")
                else:
                        if subtype == "subscribe":
                                self.sendPresence(to=self.jabberID, fro=config.jid, ptype="subscribed")