From 6890c7c42b314e31902cf174ad2ce1bdb8f62e1c Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 31 Mar 2011 20:32:41 +0300 Subject: fixed another metacontacts problem, optimized some functions --- utilities.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'utilities.cpp') diff --git a/utilities.cpp b/utilities.cpp index 8a2fe53..f05ebed 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -975,7 +975,13 @@ void AddHandlers() bool isContactSecured(HANDLE hContact) { - if(!DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0)) + BYTE gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0); + if(!gpg_enc) + { + hContact = metaGetContact(hContact); + gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0); + } + if(!gpg_enc) return false; TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); if(!key[0]) -- cgit v1.2.3