summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorRichard Chan <richard@treeboxsolutions.com>2015-08-25 18:21:58 +0800
committerRichard Chan <richard@treeboxsolutions.com>2015-08-25 18:21:58 +0800
commit1a75b7691697549b5e9adae4eba8ac1504ba3095 (patch)
tree5e720d767e09530d7edacacc906702761aaa9f17 /sleekxmpp
parente5582694c07236e6830c20361840360a1dde37f3 (diff)
downloadslixmpp-1a75b7691697549b5e9adae4eba8ac1504ba3095.tar.gz
slixmpp-1a75b7691697549b5e9adae4eba8ac1504ba3095.tar.bz2
slixmpp-1a75b7691697549b5e9adae4eba8ac1504ba3095.tar.xz
slixmpp-1a75b7691697549b5e9adae4eba8ac1504ba3095.zip
Only send time if Iq type is get.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0202/time.py7
1 files 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):
"""