summaryrefslogtreecommitdiff
path: root/protocols
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 /protocols
parent11b0f497c9a7d13ea7caba9841d661f72389751c (diff)
VKontakte:
fix #1392 (access denied on typing for banned contacts) fix ‘?’ in avatar filenames Fingerprint: fixed Conversations detect
Diffstat (limited to 'protocols')
-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
4 files changed, 13 insertions, 3 deletions
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);