Make XEP-0186 return futures as well
Improving the api if the developer wants to wait on them.
This commit is contained in:
parent
90ea2a3411
commit
1a00a08b7d
@ -33,7 +33,7 @@ class XEP_0186(BasePlugin):
|
|||||||
iq['type'] = 'set'
|
iq['type'] = 'set'
|
||||||
iq['from'] = ifrom
|
iq['from'] = ifrom
|
||||||
iq.enable('invisible')
|
iq.enable('invisible')
|
||||||
iq.send(callback=callback, timeout=timeout)
|
return iq.send(callback=callback, timeout=timeout)
|
||||||
|
|
||||||
def set_visible(self, ifrom=None, callback=None,
|
def set_visible(self, ifrom=None, callback=None,
|
||||||
timeout=None):
|
timeout=None):
|
||||||
@ -41,4 +41,4 @@ class XEP_0186(BasePlugin):
|
|||||||
iq['type'] = 'set'
|
iq['type'] = 'set'
|
||||||
iq['from'] = ifrom
|
iq['from'] = ifrom
|
||||||
iq.enable('visible')
|
iq.enable('visible')
|
||||||
iq.send(callback=callback, timeout=timeout)
|
return iq.send(callback=callback, timeout=timeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user