From 4d7786a83052b2242a7a33b961bfe36bfc63245e Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Mon, 13 Dec 2021 13:53:12 +0100 Subject: [PATCH] Changed iq.attrib['to'] to iq['to'], same for 'from'. --- slixmpp/plugins/xep_0009/rpc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/slixmpp/plugins/xep_0009/rpc.py b/slixmpp/plugins/xep_0009/rpc.py index 497303a4..b00432b0 100644 --- a/slixmpp/plugins/xep_0009/rpc.py +++ b/slixmpp/plugins/xep_0009/rpc.py @@ -53,8 +53,8 @@ class XEP_0009(BasePlugin): def make_iq_method_call(self, pto, pmethod, params): iq = self.xmpp.make_iq_set() - iq.attrib['to'] = pto - iq.attrib['from'] = self.xmpp.boundjid.full + iq['to'] = pto + iq['from'] = self.xmpp.boundjid.full iq.enable('rpc_query') iq['rpc_query']['method_call']['method_name'] = pmethod iq['rpc_query']['method_call']['params'] = params @@ -62,16 +62,16 @@ class XEP_0009(BasePlugin): def make_iq_method_response(self, pid, pto, params): iq = self.xmpp.make_iq_result(pid) - iq.attrib['to'] = pto - iq.attrib['from'] = self.xmpp.boundjid.full + iq['to'] = pto + iq['from'] = self.xmpp.boundjid.full iq.enable('rpc_query') iq['rpc_query']['method_response']['params'] = params return iq def make_iq_method_response_fault(self, pid, pto, params): iq = self.xmpp.make_iq_result(pid) - iq.attrib['to'] = pto - iq.attrib['from'] = self.xmpp.boundjid.full + iq['to'] = pto + iq['from'] = self.xmpp.boundjid.full iq.enable('rpc_query') iq['rpc_query']['method_response']['params'] = None iq['rpc_query']['method_response']['fault'] = params