[gotr] Fix AttibuteError bug in get_control
gotr expects fjid to be str, but it can be nbxmpp.JID. Converting to str shouldn't hurt, although could as well call fjid.getStripped() instead of gajim.get_jid_without_resource. Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/gajim/common/ged.py", line 93, in raise_event if handler(*args, **kwargs): File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 564, in handle_incoming_msg appdata={'thread':event.session.thread_id if event.session else None}) File "/home/livid/.local/share/gajim/plugins/gotr/potr/context.py", line 210, in receiveMessage self.crypto.handleAKE(message, appdata=appdata) File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 282, in handleAKE outMsg = self.ake.handleRevealSig(inMsg) File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 420, in handleRevealSig self.onSuccess(self) File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 316, in goEncrypted self.ctx._wentEncrypted() File "/home/livid/.local/share/gajim/plugins/gotr/potr/context.py", line 313, in _wentEncrypted self.setState(STATE_ENCRYPTED) File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 175, in setState OtrPlugin.update_otr(self.peer, self.user.accountname) File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 521, in update_otr ctrl = cls.get_control(user, acc) File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 535, in get_control gajim.get_jid_without_resource(fjid), account) File "/usr/lib64/python2.7/site-packages/gajim/common/gajim.py", line 297, in get_jid_without_resource return jid.split('/')[0] AttributeError: JID instance has no attribute 'split'
Loading
Please register or sign in to comment