diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-03-11 19:17:47 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-03-11 19:17:47 +0000 |
commit | 7c63d57169b30a5397fb8e1d0929eec600372652 (patch) | |
tree | 7e4609d747abb58489f4bb211aa10dce1359e5d8 /protocols/VKontakte/src | |
parent | 4b94525fe5eeac649bbe9cc4dcc3cbf7c84d226c (diff) |
userinfoex: add display for vk-specific MaritalStatus
git-svn-id: http://svn.miranda-ng.org/main/trunk@16466 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/version.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 15 |
4 files changed, 6 insertions, 15 deletions
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index 47165280c4..6aec70d8c1 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 1
-#define __BUILD_NUM 24
+#define __BUILD_NUM 25
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index 1431b8b53f..59caa0dbf3 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VKERR_INVALID_URL 10106 // Upload server returned empty URL
#define VKERR_INVALID_USER 10107 // Invalid or unknown recipient user ID
-#define VK_API_VER "5.45"
+#define VK_API_VER "5.50"
#define VER_API CHAR_PARAM("v", VK_API_VER)
#define VK_FEED_USER 2147483647L
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index dcdc52d11b..94f4db627e 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -57,7 +57,7 @@ int CVkProto::SendMsg(MCONTACT hContact, int, const char *szMsg) ULONG uMsgId = ::InterlockedIncrement(&m_msgId);
AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, "/method/messages.send.json", true, bIsChat? &CVkProto::OnSendChatMsg : &CVkProto::OnSendMessage, AsyncHttpRequest::rpHigh)
<< INT_PARAM(bIsChat ? "chat_id" : "user_id", iUserID)
- << INT_PARAM("guid", ((LONG) time(NULL)) * 100 + uMsgId % 100)
+ << INT_PARAM("random_id", ((LONG) time(NULL)) * 100 + uMsgId % 100)
<< VER_API;
pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded");
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 45f9862ff6..d6932c6dc2 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -387,19 +387,10 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) }
// MaritalStatus
- TCHAR * ptszMaritalStatus[] = {
- TranslateT("<not specified>"),
- TranslateT("single"),
- TranslateT("in a relationship"),
- TranslateT("engaged"),
- TranslateT("married"),
- TranslateT("it\'s complicated"),
- TranslateT("actively searching"),
- TranslateT("in love")
- };
+ BYTE cMaritalStatus[] = {0, 10, 11, 12, 20, 70, 50, 60};
- if (jnItem["relation"] && jnItem["relation"].as_int() < _countof(ptszMaritalStatus))
- setTString(hContact, "MaritalStatus", ptszMaritalStatus[jnItem["relation"].as_int()]);
+ if (jnItem["relation"] && jnItem["relation"].as_int() < _countof(cMaritalStatus))
+ setByte(hContact, "MaritalStatus", cMaritalStatus[jnItem["relation"].as_int()]);
// interests, activities, music, movies, tv, books, games, quotes
CVKInteres vkInteres[] = {
|