summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slixmpp/plugins/xep_0012/last_activity.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0012/last_activity.py b/slixmpp/plugins/xep_0012/last_activity.py
index c1f69a44..078c5411 100644
--- a/slixmpp/plugins/xep_0012/last_activity.py
+++ b/slixmpp/plugins/xep_0012/last_activity.py
@@ -16,6 +16,7 @@ from slixmpp.xmlstream import JID, register_stanza_plugin
from slixmpp.xmlstream.handler import Callback
from slixmpp.xmlstream.matcher import StanzaPath
from slixmpp.plugins.xep_0012 import stanza, LastActivity
+from slixmpp import coroutine_wrapper
log = logging.getLogger(__name__)
@@ -76,8 +77,9 @@ class XEP_0012(BasePlugin):
def del_last_activity(self, jid):
self.api['del_last_activity'](jid)
+ @coroutine_wrapper
def get_last_activity(self, jid, local=False, ifrom=None, timeout=None,
- callback=None, timeout_callback=None):
+ callback=None, timeout_callback=None, coroutine=False):
if jid is not None and not isinstance(jid, JID):
jid = JID(jid)
@@ -98,7 +100,7 @@ class XEP_0012(BasePlugin):
iq['to'] = jid
iq['type'] = 'get'
iq.enable('last_activity')
- return iq.send(timeout=timeout, callback=callback,
+ return iq.send(timeout=timeout, callback=callback, coroutine=coroutine,
timeout_callback=timeout_callback)
def _handle_get_last_activity(self, iq):