Added opportunistic send functionality to cmd_msg

If policy is set to 'opportunistic' then when the user executes cmd_msg it will append the otr whitespace tag to the message

The other client should start AKE once it receives the message.

TODO: Analyze incoming messages for whitespace tag
This commit is contained in:
lightb
2014-04-21 18:03:07 -04:00
parent 1ceca89296
commit da89e24172
3 changed files with 23 additions and 4 deletions

View File

@@ -23,6 +23,8 @@
#ifndef OTR_H
#define OTR_H
#define OTRL_TAG " \t \t\t\t\t \t \t \t "
#include "config/accounts.h"
void otr_init_module(void);

View File

@@ -108,6 +108,8 @@ otrlib_encrypt_message(OtrlUserState user_state, OtrlMessageAppOps *ops, char *j
{
gcry_error_t err;
ops.policy = OTRL_POLICY_SEND_WHITESPACE_TAG;
err = otrl_message_sending(
user_state,
ops,