summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-10-21 23:57:04 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-10-21 23:57:04 +0300
commitac0ead8e1e00e2628373954b4a2e5f6d9d8986ad (patch)
tree92b91141567c063e42547428b3ff27c59f42cc76 /messages.cpp
parentd5baf212f45c3926ffec3bccad77ca4dd0751d23 (diff)
modified: messages.cpp
modified: utilities.cpp
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/messages.cpp b/messages.cpp
index 8df3a2b..5c6036d 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -41,6 +41,12 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
{ //check for gpg related data
wstring str = toUTF16(msg);
+ if(str.empty())
+ {
+ TCHAR *tmp = mir_a2t(msg);
+ str += tmp;
+ mir_free(tmp);
+ }
wstring::size_type s1 = wstring::npos, s2 = wstring::npos;
if((str.find(_T("-----END PGP PUBLIC KEY BLOCK-----")) != wstring::npos) && (str.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----")) != wstring::npos))
@@ -353,6 +359,12 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
return 1;
}
wstring str = toUTF16(msg);
+ if(str.empty())
+ {
+ TCHAR *tmp = mir_a2t(msg);
+ str += tmp;
+ mir_free(tmp);
+ }
mir_free((void**)pre->szMessage);
pre->szMessage = mir_strdup(toUTF8(str).c_str());
return CallService(MS_PROTO_CHAINRECV, w, (LPARAM)ccs);
@@ -393,6 +405,12 @@ int SendMsgSvc(WPARAM w, LPARAM l)
{ //encrypt data here
wstring str = toUTF16(msg);
+ if(str.empty())
+ {
+ TCHAR *tmp = mir_a2t(msg);
+ str += tmp;
+ mir_free(tmp);
+ }
{ //not xmpp, just replace whole message
string out;
DWORD code;