XEP-0202: wrap get_entity_time() with coroutine_wrapper

This commit is contained in:
mathieui 2015-02-23 19:39:13 +01:00
parent c214e4f037
commit 6fb3ecd414
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -9,6 +9,7 @@
import logging
from slixmpp.stanza.iq import Iq
from slixmpp import coroutine_wrapper
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.xmlstream.handler import Callback
from slixmpp.xmlstream.matcher import StanzaPath
@ -76,6 +77,7 @@ class XEP_0202(BasePlugin):
iq['entity_time']['time'] = self.local_time(iq['to'])
iq.send()
@coroutine_wrapper
def get_entity_time(self, to, ifrom=None, **iqargs):
"""
Request the time from another entity.