mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Added additional parameter to xep_0030's getInfo and getItems methods.
By using dfrom, a server component may send disco requests using any of its JIDS.
This commit is contained in:
parent
332eea3b3b
commit
01e8040a07
1 changed files with 4 additions and 4 deletions
|
@ -293,19 +293,19 @@ class xep_0030(base.base_plugin):
|
||||||
|
|
||||||
# Older interface methods for backwards compatibility
|
# Older interface methods for backwards compatibility
|
||||||
|
|
||||||
def getInfo(self, jid, node=''):
|
def getInfo(self, jid, node='', dfrom=None):
|
||||||
iq = self.xmpp.Iq()
|
iq = self.xmpp.Iq()
|
||||||
iq['type'] = 'get'
|
iq['type'] = 'get'
|
||||||
iq['to'] = jid
|
iq['to'] = jid
|
||||||
iq['from'] = self.xmpp.fulljid
|
iq['from'] = dfrom
|
||||||
iq['disco_info']['node'] = node
|
iq['disco_info']['node'] = node
|
||||||
iq.send()
|
iq.send()
|
||||||
|
|
||||||
def getItems(self, jid, node=''):
|
def getItems(self, jid, node='', dfrom=None):
|
||||||
iq = self.xmpp.Iq()
|
iq = self.xmpp.Iq()
|
||||||
iq['type'] = 'get'
|
iq['type'] = 'get'
|
||||||
iq['to'] = jid
|
iq['to'] = jid
|
||||||
iq['from'] = self.xmpp.fulljid
|
iq['from'] = dfrom
|
||||||
iq['disco_items']['node'] = node
|
iq['disco_items']['node'] = node
|
||||||
iq.send()
|
iq.send()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue