summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-11-30 20:05:12 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2010-11-30 20:05:12 +0200
commitd16c6a6d264b91d545e4baa24b2d9efd06ec0260 (patch)
tree86cf152cd85e7241197812554ee4f7e211b4292f /messages.cpp
parent46f48e58a81256148f74e5d753c708dd1ff3d563 (diff)
parentb9278adb04c824b47da7ac0ec7c1c8ef5931c888 (diff)
Merge branch 'new_gpg' into new_gpg_autoexchange
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/messages.cpp b/messages.cpp
index 537e25b..c4c804c 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -150,7 +150,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
{
setSrmmIcon(metaGetContact(hContact));
setClistIcon(metaGetContact(hContact));
- HistoryLog(metaGetContact(hContact), "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, DBEF_READ);
+ HistoryLog(metaGetContact(hContact), "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, 0);
}
HistoryLog(hContact, "PGP Encryption turned on by key autoexchange feature", EVENTTYPE_MESSAGE, 0);
}
@@ -634,9 +634,16 @@ int SendMsgSvc(WPARAM w, LPARAM l)
if(!isContactSecured(hContact))
return CallService(MS_PROTO_CHAINSEND, w, l);
-
{ //encrypt data here
- wstring str = toUTF16(msg);
+ wstring str;
+ if(!metaIsSubcontact(hContact))
+ str = toUTF16(msg);
+ else
+ {//workaround ...
+ wchar_t *tmp = mir_a2t(msg);
+ str.append(tmp);
+ mir_free(tmp);
+ }
{ //not xmpp, just replace whole message
string out;
DWORD code;
@@ -775,8 +782,8 @@ int SendMsgSvc(WPARAM w, LPARAM l)
str_event.insert(0, toUTF8(outopentag));
str_event.append(toUTF8(outclosetag));
}
- HistoryLog(hContact, (char*)str_event.c_str(), EVENTTYPE_MESSAGE, DBEF_SENT | DBEF_UTF);
- HistoryLog(metaGetContact(hContact), (char*)str_event.c_str(), EVENTTYPE_MESSAGE, DBEF_SENT | DBEF_UTF);
+ HistoryLog(hContact, (char*)str_event.c_str(), EVENTTYPE_MESSAGE, DBEF_SENT);
+ HistoryLog(metaGetContact(hContact), (char*)str_event.c_str(), EVENTTYPE_MESSAGE, DBEF_SENT);
hcontact_data[hContact].msgs_to_ignore.push_back((char*)ccs->lParam);
hcontact_data[metaGetContact(hContact)].msgs_to_ignore.push_back((char*)ccs->lParam); //hmm, twice ? metacontacts !! %)
CallContactService(hContact, PSS_MESSAGE, (WPARAM)PREF_UTF, (LPARAM)toUTF8(str).c_str());