diff options
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 | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 16 |
4 files changed, 9 insertions, 15 deletions
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index b71271e598..7348f04c1f 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 2
-#define __BUILD_NUM 9
+#define __BUILD_NUM 10
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index 01e92919c2..9c8b4ed64a 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -82,7 +82,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VK_USER_DEACTIVATE_ACTION 9321
-#define VK_API_VER "5.60"
+#define VK_API_VER "5.62"
#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 d770180521..84b8075d3f 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -142,8 +142,8 @@ int CVkProto::OnDbEventRead(WPARAM, LPARAM hDbEvent) MCONTACT hContact = db_event_getContact(hDbEvent);
if (!hContact)
return 0;
-
- CMStringA szProto(ptrA(db_get_sa(hContact, "Protocol", "p")));
+
+ CMStringA szProto(GetContactProto(hContact));
if (szProto.IsEmpty() || szProto != m_szModuleName)
return 0;
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 8de06350ac..e47ca75430 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -347,8 +347,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) }
int iNewStatus = (jnItem["online"].as_int() == 0) ? ID_STATUS_OFFLINE : ID_STATUS_ONLINE;
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != iNewStatus)
- setWord(hContact, "Status", iNewStatus);
+ setWord(hContact, "Status", iNewStatus);
if (iNewStatus == ID_STATUS_ONLINE) {
db_set_dw(hContact, "BuddyExpectator", "LastSeen", (DWORD)time(NULL));
@@ -379,9 +378,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) setWString(hContact, "Phone", wszValue);
wszValue = jnItem["status"].as_mstring();
- CMStringW wszOldStatus(ptrW(db_get_wsa(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg")));
- if (wszValue != wszOldStatus)
- db_set_ws(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg", wszValue);
+ db_set_ws(hContact, hContact ? "CList" : m_szModuleName, "StatusMsg", wszValue);
CMStringW wszOldListeningTo(ptrW(db_get_wsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
@@ -416,7 +413,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) }
// MaritalStatus
- BYTE cMaritalStatus[] = {0, 10, 11, 12, 20, 70, 50, 60};
+ BYTE cMaritalStatus[] = {0, 10, 11, 12, 20, 70, 50, 60, 80};
if (jnItem["relation"] && jnItem["relation"].as_int() < _countof(cMaritalStatus))
setByte(hContact, "MaritalStatus", cMaritalStatus[jnItem["relation"].as_int()]);
@@ -675,8 +672,7 @@ void CVkProto::OnReceiveGroupInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR if (!wszValue.IsEmpty())
setWString(hContact, "Nick", wszValue);
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_ONLINE)
- setWord(hContact, "Status", ID_STATUS_ONLINE);
+ setWord(hContact, "Status", ID_STATUS_ONLINE);
setByte(hContact, "Auth", !bIsMember);
setByte(hContact, "friend", bIsMember);
@@ -700,9 +696,7 @@ void CVkProto::OnReceiveGroupInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR }
wszValue = jnItem["status"].as_mstring();
- CMStringW wszOldStatus(ptrW(db_get_wsa(hContact, "CList", "StatusMsg")));
- if (wszValue != wszOldStatus)
- db_set_ws(hContact, "CList", "StatusMsg", wszValue);
+ db_set_ws(hContact, "CList", "StatusMsg", wszValue);
CMStringW wszOldListeningTo(ptrW(db_get_wsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
|