OTR Module raise an exception
Bug description
Sometimes the otr module raises an exception by a fjid to nick or room
Steps to reproduce
- Use otr
- make a connection to a second party
- write some text
the exception comes sometimes after a while
Software versions
OS version: debian testing and on windows 7
GTK version: 2.24.10
PyGTK version: 2.24.0
The error is generated in otrmodule.py. The original function is:
def get_jid_from_fjid(fjid):
return gajim.get_room_and_nick_from_fjid(fjid)
Possible solution:
def get_jid_from_fjid(fjid):
if isinstance(fjid, nbxmpp.protocol.JID):
fjid = str(fjid)
return gajim.get_room_and_nick_from_fjid(fjid)
Or extending the nbxmpp.protocol.JID class with a split function that return a str. Then a hasattr(fjid, "split") to test if a split is possible would be sufficient.