diff options
author | ElzorFox <elzorfox@ya.ru> | 2016-11-14 13:40:47 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2016-11-14 13:40:47 +0500 |
commit | c19f2f90fa1e72f346e511fa166f461f890ede7c (patch) | |
tree | 35722da5dc759c2478f0a0a42987f277bea03e61 | |
parent | a2cedee6d5e03c56e8234ba1150727ce3857e638 (diff) |
VKontakte: add 'ShowVkDeactivateEvents' hidden option (default true)
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_struct.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index d078df244c..f22b9452ac 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1455,6 +1455,8 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType)
{
+ debugLogW(L"CVkProto::AddVkDeactivateEvent hContact=%d, wszType=%s bShowVkDeactivateEvents=%d", hContact, wszType, (int)m_vkOptions.bShowVkDeactivateEvents);
+
CVKDeactivateEvent vkDeactivateEvent[] = {
{ L"", Translate("User restored control over own page") },
{ L"deleted", Translate("User was deactivated (deleted)") },
@@ -1478,7 +1480,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType) dbei.eventType = VK_USER_DEACTIVATE_ACTION;
dbei.cbBlob = mir_strlen(vkDeactivateEvent[iDEIdx].szDescription) + 1;
dbei.pBlob = (PBYTE)mir_strdup(vkDeactivateEvent[iDEIdx].szDescription);
- dbei.flags = DBEF_UTF;
+ dbei.flags = DBEF_UTF | (m_vkOptions.bShowVkDeactivateEvents ? 0 : DBEF_READ);
db_event_add(hContact, &dbei);
}
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index 8373f8be89..a3bbd939a1 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -212,6 +212,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) : bSplitFormatFwdMsg(proto, "SplitFormatFwdMsg", true),
bSyncReadMessageStatusFromServer(proto, "SyncReadMessageStatusFromServer", false),
bLoadFullCList(proto, "LoadFullCList", false),
+ bShowVkDeactivateEvents(proto, "ShowVkDeactivateEvens", true),
bShowProtoMenuItem0(proto, "ShowProtoMenuItem0", true),
bShowProtoMenuItem1(proto, "ShowProtoMenuItem1", true),
diff --git a/protocols/VKontakte/src/vk_struct.h b/protocols/VKontakte/src/vk_struct.h index a17d056278..b37dbc0f6d 100644 --- a/protocols/VKontakte/src/vk_struct.h +++ b/protocols/VKontakte/src/vk_struct.h @@ -336,6 +336,7 @@ struct CVKOptions { CMOption<BYTE> bLoadFullCList;
CMOption<BYTE> bSendVKLinksAsAttachments;
CMOption<BYTE> bLoadSentAttachments;
+ CMOption<BYTE> bShowVkDeactivateEvents;
CMOption<BYTE> bShowProtoMenuItem0;
CMOption<BYTE> bShowProtoMenuItem1;
|