From 1a75b7691697549b5e9adae4eba8ac1504ba3095 Mon Sep 17 00:00:00 2001 From: Richard Chan Date: Tue, 25 Aug 2015 18:21:58 +0800 Subject: Only send time if Iq type is get. --- sleekxmpp/plugins/xep_0202/time.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sleekxmpp/plugins/xep_0202/time.py b/sleekxmpp/plugins/xep_0202/time.py index d5b3af37..4e48eae8 100644 --- a/sleekxmpp/plugins/xep_0202/time.py +++ b/sleekxmpp/plugins/xep_0202/time.py @@ -72,9 +72,10 @@ class XEP_0202(BasePlugin): Arguments: iq -- The Iq time request stanza. """ - iq.reply() - iq['entity_time']['time'] = self.local_time(iq['to']) - iq.send() + if iq['type'] == 'get': + iq.reply() + iq['entity_time']['time'] = self.local_time(iq['to']) + iq.send() def get_entity_time(self, to, ifrom=None, **iqargs): """ -- cgit v1.2.3