diff options
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utilities.cpp b/utilities.cpp index 05d0bde..40c4b32 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -933,7 +933,12 @@ void AddHandlers() bool isContactSecured(HANDLE hContact) { TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); - if(DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0) && (_tcslen(key) > 0)) + if(!key[0]) + { + mir_free(key); + key = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", _T("")); + } + if((DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0) > 0 || DBGetContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 0) > 0) && (_tcslen(key) > 0)) { mir_free(key); return true; |