XEP-0163: wrap publish() with coroutine_wrapper
This commit is contained in:
parent
e85fa4203e
commit
69da1c1d7c
1 changed files with 5 additions and 2 deletions
|
@ -10,6 +10,7 @@ import logging
|
||||||
|
|
||||||
from slixmpp.xmlstream import register_stanza_plugin
|
from slixmpp.xmlstream import register_stanza_plugin
|
||||||
from slixmpp.plugins.base import BasePlugin, register_plugin
|
from slixmpp.plugins.base import BasePlugin, register_plugin
|
||||||
|
from slixmpp import coroutine_wrapper
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -82,8 +83,9 @@ class XEP_0163(BasePlugin):
|
||||||
feature='%s+notify' % namespace)
|
feature='%s+notify' % namespace)
|
||||||
self.xmpp['xep_0115'].update_caps(jid)
|
self.xmpp['xep_0115'].update_caps(jid)
|
||||||
|
|
||||||
|
@coroutine_wrapper
|
||||||
def publish(self, stanza, node=None, id=None, options=None, ifrom=None,
|
def publish(self, stanza, node=None, id=None, options=None, ifrom=None,
|
||||||
timeout_callback=None, callback=None, timeout=None):
|
timeout_callback=None, callback=None, timeout=None, coroutine=False):
|
||||||
"""
|
"""
|
||||||
Publish a PEP update.
|
Publish a PEP update.
|
||||||
|
|
||||||
|
@ -113,7 +115,8 @@ class XEP_0163(BasePlugin):
|
||||||
options=options, ifrom=ifrom,
|
options=options, ifrom=ifrom,
|
||||||
callback=callback,
|
callback=callback,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
timeout_callback=timeout_callback)
|
timeout_callback=timeout_callback,
|
||||||
|
coroutine=coroutine)
|
||||||
|
|
||||||
|
|
||||||
register_plugin(XEP_0163)
|
register_plugin(XEP_0163)
|
||||||
|
|
Loading…
Reference in a new issue