summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-01-11 01:18:09 +0500
committerElzorFox <elzorfox@ya.ru>2017-01-11 01:18:09 +0500
commit7aed63a94c430094a66006ed459bfb8cbd7ff5f2 (patch)
treec4df980c9d3522134bfdc8e18700a8c93af8c9c3 /protocols/VKontakte/src/vk_chats.cpp
parent83402fe2934d403c8d3a436baed5261cd315dc85 (diff)
Revert "VKontakte: no more write to db if oldValue == newValue"
This reverts commit 77cccf9d4b13d9fad437eaf6361cec016a4ce27c.
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index e5b9b3bc6c..79ee8ff0ed 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -68,7 +68,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
Chat_GetInfo(&gci);
c->m_hContact = gci.hContact;
- DBSetWString(gci.hContact, "Nick", wszTitle);
+ setWString(gci.hContact, "Nick", wszTitle);
m_chats.insert(c);
for (int i = _countof(sttStatuses)-1; i >= 0; i--)
@@ -77,7 +77,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
setDword(gci.hContact, "vk_chat_id", id);
CMStringW wszHomepage(FORMAT, L"https://vk.com/im?sel=c%d", id);
- DBSetWString(gci.hContact, "Homepage", wszHomepage);
+ setWString(gci.hContact, "Homepage", wszHomepage);
db_unset(gci.hContact, m_szModuleName, "off");
@@ -233,9 +233,9 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
continue;
hContact = SetContactInfo(jnUser, true);
- DBSetByte(hContact, "CList", "Hidden", 1);
- DBSetByte(hContact, "CList", "NotOnList", 1);
- DBSetDWord(hContact, "Ignore", "Mask1", 0);
+ db_set_b(hContact, "CList", "Hidden", 1);
+ db_set_b(hContact, "CList", "NotOnList", 1);
+ db_set_dw(hContact, "Ignore", "Mask1", 0);
}
const JSONNode &jnMsgs = jnResponse["msgs"];
@@ -272,7 +272,7 @@ void CVkProto::SetChatTitle(CVkChatInfo *cc, LPCWSTR wszTopic)
return;
cc->m_wszTopic = mir_wstrdup(wszTopic);
- DBSetWString(cc->m_hContact, "Nick", wszTopic);
+ setWString(cc->m_hContact, "Nick", wszTopic);
Chat_ChangeSessionName(m_szModuleName, cc->m_wszId, wszTopic);
}
@@ -794,7 +794,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch)
Chat_Event(&gce);
cu->m_wszNick = mir_wstrdup(wszNewNick);
- DBSetWString(cc->m_hContact, CMStringA(FORMAT, "nick%d", cu->m_uid), wszNewNick);
+ setWString(cc->m_hContact, CMStringA(FORMAT, "nick%d", cu->m_uid), wszNewNick);
}
break;