Merge pull request #393 from aalba6675/fix/time

Only send time if Iq type is get.
This commit is contained in:
Mike Taylor 2015-09-18 15:15:01 -04:00
commit 9d45370e8a

View File

@ -72,6 +72,7 @@ class XEP_0202(BasePlugin):
Arguments:
iq -- The Iq time request stanza.
"""
if iq['type'] == 'get':
iq.reply()
iq['entity_time']['time'] = self.local_time(iq['to'])
iq.send()