summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src')
-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
3 files changed, 10 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 815a87b7d6..387ef53b92 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);