diff options
author | Lance Stout <lancestout@gmail.com> | 2010-11-03 14:04:18 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-11-03 14:04:18 -0400 |
commit | 1bf34caa5b0854978596b32e2458f3c0df4552dd (patch) | |
tree | 4068551903f7c35602a2c93c56cc900853aae564 /sleekxmpp | |
parent | 576993572098d4482512fe6ae2cb91bf67cbb9f8 (diff) | |
download | slixmpp-1bf34caa5b0854978596b32e2458f3c0df4552dd.tar.gz slixmpp-1bf34caa5b0854978596b32e2458f3c0df4552dd.tar.bz2 slixmpp-1bf34caa5b0854978596b32e2458f3c0df4552dd.tar.xz slixmpp-1bf34caa5b0854978596b32e2458f3c0df4552dd.zip |
Fixes for XEP-0199 plugin.
Quick fixes to get the XEP-0199 plugin working until a proper cleanup is
done.
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/plugins/xep_0199.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0199.py b/sleekxmpp/plugins/xep_0199.py index ccd284f8..a78fd5f2 100644 --- a/sleekxmpp/plugins/xep_0199.py +++ b/sleekxmpp/plugins/xep_0199.py @@ -18,8 +18,8 @@ class xep_0199(base.base_plugin): self.xep = "0199" self.xmpp.add_handler("<iq type='get' xmlns='%s'><ping xmlns='urn:xmpp:ping'/></iq>" % self.xmpp.default_ns, self.handler_ping, name='XMPP Ping') self.running = False - #if self.config.get('keepalive', True): - #self.xmpp.add_event_handler('session_start', self.handler_pingserver, threaded=True) + if self.config.get('keepalive', True): + self.xmpp.add_event_handler('session_start', self.handler_pingserver, threaded=True) def post_init(self): base.base_plugin.post_init(self) @@ -35,7 +35,7 @@ class xep_0199(base.base_plugin): def handler_ping(self, xml): iq = self.xmpp.makeIqResult(xml.get('id', 'unknown')) - iq.attrib['to'] = xml.get('from', self.xmpp.server) + iq.attrib['to'] = xml.get('from', self.xmpp.boundjid.domain) self.xmpp.send(iq) def sendPing(self, jid, timeout = 30): |