summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-05 13:55:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-05 13:55:23 +0300
commit62a7bb9bc5069310a38c52d5f44d2a61267eed2c (patch)
treef9ba79193cbda23c3afe6060872f5e69ffac6436
parent11b0f497c9a7d13ea7caba9841d661f72389751c (diff)
VKontakte:
fix #1392 (access denied on typing for banned contacts) fix ‘?’ in avatar filenames Fingerprint: fixed Conversations detect
-rw-r--r--plugins/FingerprintNG/src/masks.cpp4
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp7
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp3
5 files changed, 15 insertions, 5 deletions
diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp
index 6c5fc80dac..557937b4f7 100644
--- a/plugins/FingerprintNG/src/masks.cpp
+++ b/plugins/FingerprintNG/src/masks.cpp
@@ -1,4 +1,4 @@
-/*
+/*
Fingerprint NG (client version) icons module for Miranda NG
Copyright © 2006-18 ghazan, mataes, HierOS, FYR, Bio, nullbie, faith_healer and all respective contributors.
@@ -238,7 +238,7 @@ KN_FP_MASK def_kn_fp_mask[] =
{ "client_Colloquy", L"Colloquy*", L"Colloquy", IDI_COLLOQUY, JABBER_CASE, TRUE },
{ "client_CommuniGate", L"*CommuniGate*", L"CommuniGate Pro", IDI_COMMUNIGATE, JABBER_CASE, TRUE },
{ "client_Conference", L"Conference*", L"Conference Bot (GMail)", IDI_CONFERENCE, JABBER_CASE, TRUE },
- { "client_Conversations", L"*http://conversations.im*", L"Conversations", IDI_CONVERSATIONS, JABBER_CASE, TRUE },
+ { "client_Conversations", L"*http://conversations.im*|Conversations IM*", L"Conversations", IDI_CONVERSATIONS, JABBER_CASE, TRUE },
{ "client_Crosstalk", L"*Cross*talk*", L"Crosstalk", IDI_CROSSTALK, JABBER_CASE, TRUE },
{ "client_Cudumar", L"*Cudumar*", L"Cudumar", IDI_CUDUMAR, JABBER_CASE, TRUE },
{ "client_CyclopsChat", L"*Cyclops*", L"Cyclops Chat", IDI_CYCLOPS_CHAT, JABBER_CASE, TRUE },
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 79e9066c07..5330ddec60 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -283,7 +283,9 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode)
ConnectionFailed(LOGINERR_WRONGPASSWORD);
break;
case VKERR_ACCESS_DENIED:
- if (jnError["error_msg"] && jnError["error_msg"].as_mstring() == L"Access denied: can't set typing activity for this peer") {
+ if ((jnError["error_msg"] && jnError["error_msg"].as_mstring() == L"Access denied: can't set typing activity for this peer")
+ || (pReq->m_szUrl.Find("messages.setActivity.json") > -1)
+ ) {
debugLogA("CVkProto::CheckJsonResult VKERR_ACCESS_DENIED (can't set typing activity) - ignore");
break;
}
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index 43d4d0ecbd..a566618bc3 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 5
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index af7e9680f4..64d8d53a3d 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -141,9 +141,14 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, wchar_t *pwszDest, size_t cb
const wchar_t *szFileType = L".jpg";
ptrW wszUrl(getWStringA(hContact, "AvatarUrl"));
if (wszUrl) {
- wchar_t *p = wcsrchr(wszUrl, '.');
+ wchar_t *p = wcschr(wszUrl, '?');
+ if (p != nullptr)
+ *p = 0;
+
+ p = wcsrchr(wszUrl, '.');
if (p != nullptr)
szFileType = p;
+
}
LONG id = getDword(hContact, "ID", VK_INVALID_USER);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index e8325d3d41..46582b8e90 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -624,6 +624,9 @@ int CVkProto::UserIsTyping(MCONTACT hContact, int type)
if (userID == VK_INVALID_USER || !IsOnline() || userID == VK_FEED_USER)
return 1;
+ if (!IsEmpty(ptrW(db_get_wsa(hContact, m_szModuleName, "Deactivated"))))
+ return 1;
+
if (m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnTyping)
MarkMessagesRead(hContact);