summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 5dc673c024..7b7766e3f2 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -664,7 +664,17 @@ void SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
wstring file = toUTF16(get_random(10));
wstring path;
extern bool bJabberAPI, bIsMiranda09;
- char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", "");
+ LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ PROTOACCOUNT *acc = (PROTOACCOUNT*)CallService(MS_PROTO_GETCONTACTBASEPROTO, 0, (LPARAM)proto);
+ std::string acc_str;
+ if(acc)
+ {
+ acc_str = toUTF8(acc->tszAccountName);
+ acc_str += "(";
+ acc_str += acc->szModuleName;
+ acc_str += ")" ;
+ }
+ char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, acc_str.empty()?"KeyID":acc_str.c_str(), "");
if(!tmp[0])
{
mir_free(tmp);