XEP-0202: wrap get_entity_time() with coroutine_wrapper
This commit is contained in:
parent
c214e4f037
commit
6fb3ecd414
@ -9,6 +9,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from slixmpp.stanza.iq import Iq
|
from slixmpp.stanza.iq import Iq
|
||||||
|
from slixmpp import coroutine_wrapper
|
||||||
from slixmpp.xmlstream import register_stanza_plugin
|
from slixmpp.xmlstream import register_stanza_plugin
|
||||||
from slixmpp.xmlstream.handler import Callback
|
from slixmpp.xmlstream.handler import Callback
|
||||||
from slixmpp.xmlstream.matcher import StanzaPath
|
from slixmpp.xmlstream.matcher import StanzaPath
|
||||||
@ -76,6 +77,7 @@ class XEP_0202(BasePlugin):
|
|||||||
iq['entity_time']['time'] = self.local_time(iq['to'])
|
iq['entity_time']['time'] = self.local_time(iq['to'])
|
||||||
iq.send()
|
iq.send()
|
||||||
|
|
||||||
|
@coroutine_wrapper
|
||||||
def get_entity_time(self, to, ifrom=None, **iqargs):
|
def get_entity_time(self, to, ifrom=None, **iqargs):
|
||||||
"""
|
"""
|
||||||
Request the time from another entity.
|
Request the time from another entity.
|
||||||
|
Loading…
Reference in New Issue
Block a user