Only send time if Iq type is get.

This commit is contained in:
Richard Chan 2015-08-25 18:21:58 +08:00
parent e5582694c0
commit 1a75b76916

View File

@ -72,9 +72,10 @@ class XEP_0202(BasePlugin):
Arguments: Arguments:
iq -- The Iq time request stanza. iq -- The Iq time request stanza.
""" """
iq.reply() if iq['type'] == 'get':
iq['entity_time']['time'] = self.local_time(iq['to']) iq.reply()
iq.send() iq['entity_time']['time'] = self.local_time(iq['to'])
iq.send()
def get_entity_time(self, to, ifrom=None, **iqargs): def get_entity_time(self, to, ifrom=None, **iqargs):
""" """