Changed iq.attrib['to'] to iq['to'], same for 'from'.
This commit is contained in:
parent
8fccfc452b
commit
4d7786a830
1 changed files with 6 additions and 6 deletions
|
@ -53,8 +53,8 @@ class XEP_0009(BasePlugin):
|
||||||
|
|
||||||
def make_iq_method_call(self, pto, pmethod, params):
|
def make_iq_method_call(self, pto, pmethod, params):
|
||||||
iq = self.xmpp.make_iq_set()
|
iq = self.xmpp.make_iq_set()
|
||||||
iq.attrib['to'] = pto
|
iq['to'] = pto
|
||||||
iq.attrib['from'] = self.xmpp.boundjid.full
|
iq['from'] = self.xmpp.boundjid.full
|
||||||
iq.enable('rpc_query')
|
iq.enable('rpc_query')
|
||||||
iq['rpc_query']['method_call']['method_name'] = pmethod
|
iq['rpc_query']['method_call']['method_name'] = pmethod
|
||||||
iq['rpc_query']['method_call']['params'] = params
|
iq['rpc_query']['method_call']['params'] = params
|
||||||
|
@ -62,16 +62,16 @@ class XEP_0009(BasePlugin):
|
||||||
|
|
||||||
def make_iq_method_response(self, pid, pto, params):
|
def make_iq_method_response(self, pid, pto, params):
|
||||||
iq = self.xmpp.make_iq_result(pid)
|
iq = self.xmpp.make_iq_result(pid)
|
||||||
iq.attrib['to'] = pto
|
iq['to'] = pto
|
||||||
iq.attrib['from'] = self.xmpp.boundjid.full
|
iq['from'] = self.xmpp.boundjid.full
|
||||||
iq.enable('rpc_query')
|
iq.enable('rpc_query')
|
||||||
iq['rpc_query']['method_response']['params'] = params
|
iq['rpc_query']['method_response']['params'] = params
|
||||||
return iq
|
return iq
|
||||||
|
|
||||||
def make_iq_method_response_fault(self, pid, pto, params):
|
def make_iq_method_response_fault(self, pid, pto, params):
|
||||||
iq = self.xmpp.make_iq_result(pid)
|
iq = self.xmpp.make_iq_result(pid)
|
||||||
iq.attrib['to'] = pto
|
iq['to'] = pto
|
||||||
iq.attrib['from'] = self.xmpp.boundjid.full
|
iq['from'] = self.xmpp.boundjid.full
|
||||||
iq.enable('rpc_query')
|
iq.enable('rpc_query')
|
||||||
iq['rpc_query']['method_response']['params'] = None
|
iq['rpc_query']['method_response']['params'] = None
|
||||||
iq['rpc_query']['method_response']['fault'] = params
|
iq['rpc_query']['method_response']['fault'] = params
|
||||||
|
|
Loading…
Reference in a new issue