diff options
author | Richard Chan <richard@treeboxsolutions.com> | 2015-08-25 18:21:58 +0800 |
---|---|---|
committer | Richard Chan <richard@treeboxsolutions.com> | 2015-08-25 18:21:58 +0800 |
commit | 1a75b7691697549b5e9adae4eba8ac1504ba3095 (patch) | |
tree | 5e720d767e09530d7edacacc906702761aaa9f17 /sleekxmpp/plugins | |
parent | e5582694c07236e6830c20361840360a1dde37f3 (diff) | |
download | slixmpp-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/plugins')
-rw-r--r-- | sleekxmpp/plugins/xep_0202/time.py | 7 |
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):
"""
|