Remove more threaded= and block= options from the plugins

(also, correct a typo)
This commit is contained in:
mathieui
2015-02-12 12:21:20 +01:00
parent 44f02fb3ab
commit 4d063e287e
22 changed files with 66 additions and 128 deletions
+6 -7
View File
@@ -81,26 +81,25 @@ class XEP_0077(BasePlugin):
return True
return False
def get_registration(self, jid=None, ifrom=None, block=True,
def get_registration(self, jid=None, ifrom=None,
timeout=None, callback=None):
iq = self.xmpp.Iq()
iq['type'] = 'get'
iq['to'] = jid
iq['from'] = ifrom
iq.enable('register')
return iq.send(block=block, timeout=timeout,
callback=callback)
return iq.send(timeout=timeout, callback=callback)
def cancel_registration(self, jid=None, ifrom=None, block=True,
def cancel_registration(self, jid=None, ifrom=None,
timeout=None, callback=None):
iq = self.xmpp.Iq()
iq['type'] = 'set'
iq['to'] = jid
iq['from'] = ifrom
iq['register']['remove'] = True
return iq.send(block=block, timeout=timeout, callback=callback)
return iq.send(timeout=timeout, callback=callback)
def change_password(self, password, jid=None, ifrom=None, block=True,
def change_password(self, password, jid=None, ifrom=None,
timeout=None, callback=None):
iq = self.xmpp.Iq()
iq['type'] = 'set'
@@ -112,4 +111,4 @@ class XEP_0077(BasePlugin):
else:
iq['register']['username'] = self.xmpp.boundjid.user
iq['register']['password'] = password
return iq.send(block=block, timeout=timeout, callback=callback)
return iq.send(timeout=timeout, callback=callback)