Fix some more blocking iq

This commit is contained in:
Florent Le Coz
2014-08-01 15:02:54 +02:00
parent fa21e262c7
commit 07e46837d9
3 changed files with 12 additions and 15 deletions
+8 -4
View File
@@ -66,16 +66,20 @@ class XEP_0280(BasePlugin):
def _handle_carbon_sent(self, msg):
self.xmpp.event('carbon_sent', msg)
def enable(self, ifrom=None, block=True, timeout=None, callback=None):
def enable(self, ifrom=None, timeout=None, callback=None,
timeout_callback=None):
iq = self.xmpp.Iq()
iq['type'] = 'set'
iq['from'] = ifrom
iq.enable('carbon_enable')
return iq.send(block=block, timeout=timeout, callback=callback)
return iq.send(timeout_callback=timeout_callback, timeout=timeout,
callback=callback)
def disable(self, ifrom=None, block=True, timeout=None, callback=None):
def disable(self, ifrom=None, timeout=None, callback=None,
timeout_callback=None):
iq = self.xmpp.Iq()
iq['type'] = 'set'
iq['from'] = ifrom
iq.enable('carbon_disable')
return iq.send(block=block, timeout=timeout, callback=callback)
return iq.send(timeout_callback=timeout_callback, timeout=timeout,
callback=callback)