From 6a38d57a0a875a61ae3167c64afa118f2cdd3d66 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 11 May 2014 15:20:24 +0100 Subject: [PATCH] Override global OTR policy with account OTR policy --- src/otr/otr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/otr/otr.c b/src/otr/otr.c index dd715233..72e6817a 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -519,6 +519,14 @@ _otr_get_their_fingerprint(const char * const recipient) static char * _otr_get_policy(const char * const recipient) { + // check account setting + ProfAccount *account = accounts_get_account(jabber_get_account_name()); + if (account->otr_policy != NULL) { + account_free(account); + return account->otr_policy; + } + account_free(account); + // check global setting return prefs_get_string(PREF_OTR_POLICY); }