diff src/plugins/plugin_xep_0234.py @ 1567:268fda4236ca

plugins XE0166, XEP-0234, XEP-0260, XEP-0261: renamed session key managing other peer's jid to "peer_jid" instead of "to_jid"
author Goffi <goffi@goffi.org>
date Sun, 08 Nov 2015 14:44:33 +0100
parents ec3848916ee8
children 1f7a34d499e0
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0234.py	Sun Nov 08 14:44:30 2015 +0100
+++ b/src/plugins/plugin_xep_0234.py	Sun Nov 08 14:44:33 2015 +0100
@@ -64,11 +64,11 @@
     def getHandler(self, profile):
         return XEP_0234_handler()
 
-    def _fileJingleSend(self, to_jid, filepath, name="", file_desc="", profile=C.PROF_KEY_NONE):
-        return self.fileJingleSend(jid.JID(to_jid), filepath, name or None, file_desc or None, profile)
+    def _fileJingleSend(self, peer_jid, filepath, name="", file_desc="", profile=C.PROF_KEY_NONE):
+        return self.fileJingleSend(jid.JID(peer_jid), filepath, name or None, file_desc or None, profile)
 
-    def fileJingleSend(self, to_jid, filepath, name=None, file_desc=None, profile=C.PROF_KEY_NONE):
-        self._j.initiate(to_jid,
+    def fileJingleSend(self, peer_jid, filepath, name=None, file_desc=None, profile=C.PROF_KEY_NONE):
+        self._j.initiate(peer_jid,
                          [{'app_ns': NS_JINGLE_FT,
                            'senders': self._j.ROLE_INITIATOR,
                            'app_kwargs': {'filepath': filepath,
@@ -93,7 +93,7 @@
         application_data = content_data['application_data']
         file_data = application_data['file_data']
         d = xml_tools.deferDialog(self.host,
-            _(CONFIRM).format(entity=session['to_jid'].full(), **file_data),
+            _(CONFIRM).format(entity=session['peer_jid'].full(), **file_data),
             _(CONFIRM_TITLE),
             type_=C.XMLUI_DIALOG_FILE,
             options={C.XMLUI_DATA_FILETYPE: C.XMLUI_DATA_FILETYPE_DIR},