I was trying to use this plugin with the latest profanity dev (0.6.0dev.master.34aa7a7), but I kept getting unencrypted chats errors.
By going into the logs I saw what was triggering the errors: a ValueError exception on line 86 of xmpp.py (encrypt_stanza() :
account, resource = jid.rsplit('/', 1)
Not sure what changed between the previous versions of this plugin and profanity, but, given how this line is written, if jid does not contain a "/", this will raise a ValueError. I replaced that line with:
So that the ValueError is correctly handled, and I was able to get back the encrypted chats.
I keep getting another error:
prof: ERR: ProfOmemoPlugin - Could not handle encrypted message.
Traceback (most recent call last):
File "/Users/me/.local/share/profanity/plugins/prof_omemo_plugin.py", line 441, in
prof_on_message_stanza_receive
msg_dict = xmpp.unpack_encrypted_stanza(stanza)
File "/Users/me/Library/Python/2.7/lib/python/site-packages/profanity_omemo_plugin-0.0.1-py2.7.egg/profanity_omemo_plugin/xmpp.py", line 297, in unpack_encrypted_stanza
payload = payload_node.text
AttributeError: 'NoneType' object has no attribute 'text'
prof: ERR: ProfOmemoPlugin - Could not handle encrypted message
I was trying to use this plugin with the latest profanity dev (0.6.0dev.master.34aa7a7), but I kept getting unencrypted chats errors.
By going into the logs I saw what was triggering the errors: a ValueError exception on line 86 of xmpp.py (encrypt_stanza() :
Not sure what changed between the previous versions of this plugin and profanity, but, given how this line is written, if jid does not contain a "/", this will raise a ValueError. I replaced that line with:
So that the ValueError is correctly handled, and I was able to get back the encrypted chats.
I keep getting another error:
But I haven't had time to look into this.
Thanks for your awesome work!