weechat-otr icon indicating copy to clipboard operation
weechat-otr copied to clipboard

start session on query?

Open fauno opened this issue 9 years ago • 10 comments

would it be ok to put up a hook running /otr start on /query? so if the other end is known to have otr the private chat is encrypted by default.

fauno avatar May 29 '15 16:05 fauno

I think you are looking for require_encryption in /otr policy.

Another good one, but not wanted in this case is /set otr.policy.default.send_tag on.

Mikaela avatar May 29 '15 16:05 Mikaela

ah ok, but this doesn't let you talk with people who doesn't have otr, so i guess i'm asking for something in between require_encryption and send_tag :P

fauno avatar May 29 '15 17:05 fauno

send_tag should start a session automatically on /query if the other party has OTR. How would this be different from send_tag?

mmb avatar May 31 '15 08:05 mmb

Doesn't send_tag send the first message without OTR but ending to the whitespace tag which then makes the OTR-supporting recepient initate OTR?

Mikaela avatar May 31 '15 08:05 Mikaela

send_tag will send all messages with the whitespace tags (including the first message) until it receives an untagged plaintext message in response.

mmb avatar May 31 '15 08:05 mmb

And what is asked here if I understand correctly is always starting query with the person automatically encrypting all messages.

Mikaela avatar May 31 '15 08:05 Mikaela

Of course you can send "?OTR?" on every query. However, with send_tags enabled, this is equivalent to sending "Hi" (which then gets the tag appended automatically).

One possible feature might be to automatically set require_encryption for every contact where an OTR session is established. But then, we would have to solve #48.

tribut avatar May 31 '15 09:05 tribut

I'm ok with enabling require_encryption for contacts with past otr sessions :)

fauno avatar May 31 '15 13:05 fauno

It seems like the send_tag policy was meant to address the automatic setup of an OTR session if the peer supports it. It only adds whitespace so that peers who don't support OTR don't see strange OTR protocol strings in the message.

The only drawback I can see is that the first message is sent in the clear but as @tribut said you can be aware of that and only send something like "hi". @fauno is this your main objection to using send_tag?

mmb avatar Jun 02 '15 05:06 mmb

you have to send "hi" and wait a few secs. i've seen many people starting to talk before the session is set (using otr in other plugins i admit). as i suggested in #48 plain text messages should be queued, not sent in plain text or dropped.

currently instead of "hi" i'm running /otr start and wait, but i think the're different scenarios:

  • require_encryption won't let you talk in plain text with no one. if the other end has otr, you have to wait until the session is started
  • send_tag allows plain text conversations and an opportunistic otr conversation.
  • require_encryption for people you already had otr sessions with won't let you talk to them until a new session is started

in this case i'll use send_tag with per-contact require_encryption :)

fauno avatar Jun 02 '15 14:06 fauno