Permalink
Browse files

Fixes for XEP-0199 plugin.

Quick fixes to get the XEP-0199 plugin working until a proper cleanup is
done.
  • Loading branch information...
1 parent 5769935 commit 1bf34caa5b0854978596b32e2458f3c0df4552dd @legastero legastero committed Nov 3, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 sleekxmpp/plugins/xep_0199.py
@@ -18,8 +18,8 @@ def plugin_init(self):
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 @@ def handler_pingserver(self, xml):
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):

0 comments on commit 1bf34ca

Please sign in to comment.