ReneVolution / profanity-omemo-plugin

A Python plugin to use (axolotl / Signal Protocol) encryption for the profanity XMPP messenger
GNU General Public License v3.0
64 stars 14 forks source link

Automatically enable OMEMO encryption for contacts that support it #26

Open devurandom opened 7 years ago

devurandom commented 7 years ago

It would be great of this plugin would automatically enable OMEMO encryption for contacts that support it, or at least remember whether such encryption was enabled previously. This would prevent the problem where people forget to /omemo start (which is rather annoying to type in every conversation, IMO) and then accidentally send messages unencrypted.

ReneVolution commented 7 years ago

You're absolutely right, once received and decrypted an OMEMO message, it should automatically adjust the chat to use OMEMO. Thanks for reporting. Will implement that.

devurandom commented 7 years ago

I'd probably be good to mimic Conversations' behaviour and/or automatically suggest OMEMO for contacts that advertise the capability and the keys and then save the user's choice for the next time.

Might be related to Blind Trust Before Verification.

ReneVolution commented 7 years ago

I need to check if profanity provides all the hooks required to mimic Conversations behaviour. What you basically ask, is:

When starting a new chat with /msg contact-jid, if the last known chat session was OMEMO enabled, enable OMEMO by default. If previously OMEMO was not turned on and any contact-jid device/resource has OMEMO capabilities, advertise the use of OMEMO in the chat window.

Is that correct so far?

And FYI, BTBV is a whole different story ... but will be tackled with Trust Management soon.

devurandom commented 7 years ago

Sounds perfect. :)

ReneVolution commented 7 years ago

Hey @devurandom, I think I am now pretty close to what you wanted. Am I?