summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-01-15 21:07:28 -0800
committerNathan Fritz <fritzy@netflint.net>2010-01-15 21:07:28 -0800
commite39a2395d7d5b1490e66316cd46b3f31b787cb37 (patch)
tree64579f2b44aa6fcf37c18f0029aa4021ade940c2 /sleekxmpp/plugins/xep_0030.py
parent5345e9a46ba6b862944bcddacd73fba448758109 (diff)
downloadslixmpp-e39a2395d7d5b1490e66316cd46b3f31b787cb37.tar.gz
slixmpp-e39a2395d7d5b1490e66316cd46b3f31b787cb37.tar.bz2
slixmpp-e39a2395d7d5b1490e66316cd46b3f31b787cb37.tar.xz
slixmpp-e39a2395d7d5b1490e66316cd46b3f31b787cb37.zip
xep 30 and 50 always reply from jid iq sent to
Diffstat (limited to 'sleekxmpp/plugins/xep_0030.py')
-rw-r--r--sleekxmpp/plugins/xep_0030.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0030.py b/sleekxmpp/plugins/xep_0030.py
index 791038cd..bff0dc17 100644
--- a/sleekxmpp/plugins/xep_0030.py
+++ b/sleekxmpp/plugins/xep_0030.py
@@ -53,7 +53,7 @@ class xep_0030(base.base_plugin):
def info_handler(self, xml):
logging.debug("Info request from %s" % xml.get('from', ''))
iq = self.xmpp.makeIqResult(xml.get('id', self.xmpp.getNewId()))
- iq.attrib['from'] = self.xmpp.fulljid
+ iq.attrib['from'] = xml.get('to')
iq.attrib['to'] = xml.get('from', self.xmpp.server)
query = xml.find('{http://jabber.org/protocol/disco#info}query')
node = query.get('node', 'main')
@@ -74,7 +74,7 @@ class xep_0030(base.base_plugin):
def item_handler(self, xml):
logging.debug("Item request from %s" % xml.get('from', ''))
iq = self.xmpp.makeIqResult(xml.get('id', self.xmpp.getNewId()))
- iq.attrib['from'] = self.xmpp.fulljid
+ iq.attrib['from'] = xml.get('to')
iq.attrib['to'] = xml.get('from', self.xmpp.server)
query = self.xmpp.makeIqQuery(iq, 'http://jabber.org/protocol/disco#items').find('{http://jabber.org/protocol/disco#items}query')
node = xml.find('{http://jabber.org/protocol/disco#items}query').get('node', 'main')
@@ -82,7 +82,7 @@ class xep_0030(base.base_plugin):
itemxml = ET.Element('item')
itemxml.attrib = item
if itemxml.attrib['jid'] is None:
- itemxml.attrib['jid'] = self.xmpp.fulljid
+ itemxml.attrib['jid'] = xml.get('to')
query.append(itemxml)
self.xmpp.send(iq)