diff options
author | James Booth <boothj5@gmail.com> | 2014-05-11 15:20:24 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-05-11 15:20:24 +0100 |
commit | 6a38d57a0a875a61ae3167c64afa118f2cdd3d66 (patch) | |
tree | 14559598b6cd4c76f7cd1c8f398170d276c9c14c /src/otr | |
parent | e8d84abb46681b68931d68094ca56214450e0670 (diff) | |
download | profani-tty-6a38d57a0a875a61ae3167c64afa118f2cdd3d66.tar.gz |
Override global OTR policy with account OTR policy
Diffstat (limited to 'src/otr')
-rw-r--r-- | src/otr/otr.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); } |