diff options
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 6 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 18c4b0e5be..d163c059d2 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -171,6 +171,9 @@ MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate) return 0;
for (auto &hContact : AccContacts()) {
+ if (isChatRoom(hContact))
+ continue;
+
LONG dbUserid = getDword(hContact, "ID", VK_INVALID_USER);
if (dbUserid == VK_INVALID_USER)
continue;
@@ -197,6 +200,9 @@ MCONTACT CVkProto::FindChat(LONG dwUserid) return 0;
for (auto &hContact : AccContacts()) {
+ if (!isChatRoom(hContact))
+ continue;
+
LONG dbUserid = getDword(hContact, "ID", VK_INVALID_USER);
if (dbUserid == VK_INVALID_USER)
continue;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 3a7e2cdfe6..f79a0f06f5 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -447,6 +447,9 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, LONG uid, int msgTime, LPCWSTR CVkChatInfo* CVkProto::GetChatByContact(MCONTACT hContact)
{
+ if (!isChatRoom(hContact))
+ return nullptr;
+
LONG dbUserid = getDword(hContact, "ID", VK_INVALID_USER);
if (dbUserid == VK_INVALID_USER)
return nullptr;
|