summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index c60dbb36ad..18c4b0e5be 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -117,6 +117,20 @@ char* ExpUrlEncode(const char *szUrl, bool strict)
/////////////////////////////////////////////////////////////////////////////////////////
+void CVkProto::CheckUpdate()
+{
+ if (getByte("Compatibility") < 1) {
+ for (auto &cc : AccContacts()) {
+ LONG userId = getDword(cc, "vk_chat_id", VK_INVALID_USER);
+ if (userId != VK_INVALID_USER) {
+ setDword(cc, "ID", userId);
+ delSetting(cc, "vk_chat_id");
+ }
+ }
+ setByte("Compatibility", 1);
+ }
+}
+
void CVkProto::ClearAccessToken()
{
debugLogA("CVkProto::ClearAccessToken");
@@ -183,7 +197,7 @@ MCONTACT CVkProto::FindChat(LONG dwUserid)
return 0;
for (auto &hContact : AccContacts()) {
- LONG dbUserid = getDword(hContact, "vk_chat_id", VK_INVALID_USER);
+ LONG dbUserid = getDword(hContact, "ID", VK_INVALID_USER);
if (dbUserid == VK_INVALID_USER)
continue;