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")