summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/messages.cpp b/messages.cpp
index 92bdb78..6d502f4 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -142,6 +142,17 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
mir_free(tmp);
}
DBWriteContactSettingByte(hContact, szGPGModuleName, "bAlwatsTrust", 1);
+ void setSrmmIcon(HANDLE);
+ void setClistIcon(HANDLE);
+ setSrmmIcon(hContact);
+ setClistIcon(hContact);
+ if(metaIsSubcontact(hContact))
+ {
+ setSrmmIcon(metaGetContact(hContact));
+ setClistIcon(metaGetContact(hContact));
+ HistoryLog(metaGetContact(hContact), "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, DBEF_READ);
+ }
+ HistoryLog(hContact, "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, 0);
}
}
hcontact_data[hContact].msgs_to_ignore.push_back(msg);
@@ -478,7 +489,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
{
string str = pre->szMessage;
mir_free((void**)pre->szMessage);
- str.insert(0, "Received unencrypted message:\n");
+ str.insert(0, "Failed to decrypt GPG encrypted message.\nReceived unencrypted message:\n");
debuglog<<time_str()<<": info: Failed to decrypt GPG encrypted message.\n";
pre->szMessage = mir_strdup(str.c_str());
return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
@@ -515,9 +526,10 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
mir_free(msg);
return 1;
}
- wstring str = toUTF16(msg);
+ string str = msg;
mir_free((void**)pre->szMessage);
- pre->szMessage = mir_strdup(toUTF8(str).c_str());
+ str.insert(0, "Received unencrypted message:\n");
+ pre->szMessage = mir_strdup(str.c_str());
return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
}
return CallService(MS_PROTO_CHAINRECV, w, l);