diff options
Diffstat (limited to 'slixmpp/plugins/xep_0084/avatar.py')
-rw-r--r-- | slixmpp/plugins/xep_0084/avatar.py | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/slixmpp/plugins/xep_0084/avatar.py b/slixmpp/plugins/xep_0084/avatar.py index 9216bdf0..2bae765a 100644 --- a/slixmpp/plugins/xep_0084/avatar.py +++ b/slixmpp/plugins/xep_0084/avatar.py @@ -15,7 +15,6 @@ from slixmpp.xmlstream.handler import Callback from slixmpp.xmlstream.matcher import StanzaPath from slixmpp.xmlstream import register_stanza_plugin, JID from slixmpp.plugins.xep_0084 import stanza, Data, MetaData -from slixmpp import coroutine_wrapper log = logging.getLogger(__name__) @@ -45,30 +44,26 @@ class XEP_0084(BasePlugin): def generate_id(self, data): return hashlib.sha1(data).hexdigest() - @coroutine_wrapper - def retrieve_avatar(self, jid, id, url=None, ifrom=None, callback=None, - timeout=None, coroutine=False): + def retrieve_avatar(self, jid, id, url=None, ifrom=None, + callback=None, timeout=None): return self.xmpp['xep_0060'].get_item(jid, Data.namespace, id, - ifrom=ifrom, callback=callback, - timeout=timeout, - coroutine=coroutine) + ifrom=ifrom, + callback=callback, + timeout=timeout) - @coroutine_wrapper def publish_avatar(self, data, ifrom=None, callback=None, - timeout=None, coroutine=False): + timeout=None): payload = Data() payload['value'] = data return self.xmpp['xep_0163'].publish(payload, id=self.generate_id(data), ifrom=ifrom, callback=callback, - timeout=timeout, - coroutine=coroutine) + timeout=timeout) - @coroutine_wrapper def publish_avatar_metadata(self, items=None, pointers=None, - ifrom=None, callback=None, timeout=None, - coroutine=False): + ifrom=None, + callback=None, timeout=None): metadata = MetaData() if items is None: items = [] @@ -88,11 +83,9 @@ class XEP_0084(BasePlugin): id=info['id'], ifrom=ifrom, callback=callback, - timeout=timeout, - coroutine=coroutine) + timeout=timeout) - @coroutine_wrapper - def stop(self, ifrom=None, callback=None, timeout=None, coroutine=False): + def stop(self, ifrom=None, callback=None, timeout=None): """ Clear existing avatar metadata information to stop notifications. @@ -109,5 +102,4 @@ class XEP_0084(BasePlugin): node=MetaData.namespace, ifrom=ifrom, callback=callback, - timeout=timeout, - coroutine=coroutine) + timeout=timeout) |