Moved OTR policy check to otr module

This commit is contained in:
James Booth
2014-05-11 15:03:10 +01:00
parent 95ff13136b
commit e8d84abb46
5 changed files with 14 additions and 3 deletions

View File

@@ -32,6 +32,7 @@
#include "roster_list.h"
#include "contact.h"
#include "ui/ui.h"
#include "config/preferences.h"
#define PRESENCE_ONLINE 1
#define PRESENCE_OFFLINE 0
@@ -515,6 +516,13 @@ _otr_get_their_fingerprint(const char * const recipient)
}
}
static char *
_otr_get_policy(const char * const recipient)
{
// check global setting
return prefs_get_string(PREF_OTR_POLICY);
}
static char *
_otr_encrypt_message(const char * const to, const char * const message)
{
@@ -596,4 +604,5 @@ otr_init_module(void)
otr_smp_secret = _otr_smp_secret;
otr_smp_question = _otr_smp_question;
otr_smp_answer = _otr_smp_answer;
otr_get_policy = _otr_get_policy;
}