summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorMike Taylor <bear42@gmail.com>2015-09-18 15:15:01 -0400
committerMike Taylor <bear42@gmail.com>2015-09-18 15:15:01 -0400
commit9d45370e8a702acca90ba89e1c7e5d7ef59bbc40 (patch)
tree4634c473b722e7ace03f1760d6a4591ee28c0425 /sleekxmpp/plugins
parentcc1cc61d36aa430f5b251c7315b251b9c9582c7f (diff)
parent1a75b7691697549b5e9adae4eba8ac1504ba3095 (diff)
downloadslixmpp-9d45370e8a702acca90ba89e1c7e5d7ef59bbc40.tar.gz
slixmpp-9d45370e8a702acca90ba89e1c7e5d7ef59bbc40.tar.bz2
slixmpp-9d45370e8a702acca90ba89e1c7e5d7ef59bbc40.tar.xz
slixmpp-9d45370e8a702acca90ba89e1c7e5d7ef59bbc40.zip
Merge pull request #393 from aalba6675/fix/time
Only send time if Iq type is get.
Diffstat (limited to 'sleekxmpp/plugins')
-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):
"""