diff --git a/src/plugins/plugin_xep_0234.py b/src/plugins/plugin_xep_0234.py index f1d87cf0..c7d42123 100644 --- a/src/plugins/plugin_xep_0234.py +++ b/src/plugins/plugin_xep_0234.py @@ -74,6 +74,7 @@ class XEP_0234(object): def fileJingleSend(self, to_jid, filepath, name=None, file_desc=None, profile=C.PROF_KEY_NONE): self._j.initiate(to_jid, [{'app_ns': NS_JINGLE_FT, + 'senders': self._j.ROLE_INITIATOR, 'app_kwargs': {'filepath': filepath, 'name': name, 'file_desc': file_desc}, @@ -165,6 +166,9 @@ class XEP_0234(object): def jingleRequestConfirmation(self, action, session, content_name, desc_elt, profile): """This method request confirmation for a jingle session""" content_data = session['contents'][content_name] + if content_data['senders'] not in (self._j.ROLE_INITIATOR, self._j.ROLE_RESPONDER): + log.warning(u"Bad sender, assuming initiator") + content_data['senders'] = self._j.ROLE_INITIATOR # first we grab file informations try: file_elt = desc_elt.elements(NS_JINGLE_FT, 'file').next()