psi-im / plugins

Officially supported Psi plugins
56 stars 24 forks source link

Add <private ...> to OTR encrypted messages #19

Closed themilkman closed 7 years ago

themilkman commented 7 years ago

Hello together,

when chatting with OTR enabled with Psi+, those encrypted (and not decrypt-able by anyone else but the receiver [theoretically^^]) messages are forwarded by Prosody to Conversations on my phone (which is the correct behavior of the server since message carbons are enabled). OTR Messages sent by Conversations on the other hand to not get forwarded to any other resource/client. I think I found the reason for it. When I do not completely misunderstand: https://xmpp.org/extensions/xep-0364.html Section: 4.3 Processing Hints defines a <private ...> stanza to avoid not decrypt-able carbons to be forwarded to other clients. There should be no unexpected and unwanted negative side-effects occur by adding this to OTR encrypted messages, I think.

In case my suggestion is correct I'd really great to see this small but really helpful improvement get implemented.

Thanks for for your work on Psi generally and for any feedback on my feature request above Cheers!

themilkman commented 7 years ago

Any opinion on this?

Ri0n commented 7 years ago

Maybe @Vitozz may take a look.

liuch commented 7 years ago

XEP-0334: Message Processing Hints says:

5. Business Rules It is important to note that message hints are, as the name implies, just hints. Implementations MUST NOT rely on other entities interpretation of the hints for any particular purpose.

That is the server is not required to follow this hint. This behavior will depend on the implementation of the server. Isn't it?

themilkman commented 7 years ago

@liuch I guess that's right. But since it has only optional positive impact it's a good thing, isn't it?

themilkman commented 7 years ago

Any further thoughts on this? @liuch

liuch commented 7 years ago

I think it should be realized, but it needs to sort out first. I have no time right now, maybe later.

themilkman commented 7 years ago

Okay, thank you @liuch !

ValdikSS commented 7 years ago

Implemented.

Neustradamus commented 7 years ago

@ValdikSS: Thanks a lot :)

themilkman commented 7 years ago

@ValdikSS: Great, thank you very much! Works fine for me :-) The only little point seems to be the first message (of the OTR negotation I guess) still has no Tag, but this is no deal for me (since the rest of the actual conversation doesn't get synced).

Again, thanks for implementing this!

ValdikSS commented 7 years ago

@themilkman yes, that's actually different issue (OTR is negotiated using barejid) which is in my to-do list.