summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-02-23 19:12:12 +0100
committermathieui <mathieui@mathieui.net>2015-02-24 22:46:03 +0100
commit69da1c1d7cf7a1c0dbbeeb83f528b4e5f5b5be0c (patch)
tree16540bed2999827d853d39bac15624193e32b24e
parente85fa4203e0ee7108d8d37f73913c21628e3d6fc (diff)
downloadslixmpp-69da1c1d7cf7a1c0dbbeeb83f528b4e5f5b5be0c.tar.gz
slixmpp-69da1c1d7cf7a1c0dbbeeb83f528b4e5f5b5be0c.tar.bz2
slixmpp-69da1c1d7cf7a1c0dbbeeb83f528b4e5f5b5be0c.tar.xz
slixmpp-69da1c1d7cf7a1c0dbbeeb83f528b4e5f5b5be0c.zip
XEP-0163: wrap publish() with coroutine_wrapper
-rw-r--r--slixmpp/plugins/xep_0163.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0163.py b/slixmpp/plugins/xep_0163.py
index e974a808..35f79f0d 100644
--- a/slixmpp/plugins/xep_0163.py
+++ b/slixmpp/plugins/xep_0163.py
@@ -10,6 +10,7 @@ import logging
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins.base import BasePlugin, register_plugin
+from slixmpp import coroutine_wrapper
log = logging.getLogger(__name__)
@@ -82,8 +83,9 @@ class XEP_0163(BasePlugin):
feature='%s+notify' % namespace)
self.xmpp['xep_0115'].update_caps(jid)
+ @coroutine_wrapper
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.
@@ -113,7 +115,8 @@ class XEP_0163(BasePlugin):
options=options, ifrom=ifrom,
callback=callback,
timeout=timeout,
- timeout_callback=timeout_callback)
+ timeout_callback=timeout_callback,
+ coroutine=coroutine)
register_plugin(XEP_0163)