diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 18 |
3 files changed, 13 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 90a7b93081..36f2ba84da 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -587,7 +587,6 @@ void CVkProto::OnChatLeave(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) CVkChatInfo *cc = (CVkChatInfo*)pReq->pUserInfo;
LeaveChat(cc->m_chatid);
-
}
INT_PTR __cdecl CVkProto::SvcDestroyKickChat(WPARAM hContact, LPARAM)
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 181ca23fb0..de595211a8 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -275,7 +275,7 @@ struct CVkProto : public PROTO<CVkProto> void RetrieveStatusMsg(const CMString &StatusMsg);
void RetrieveStatusMusic(const CMString &StatusMsg);
- MCONTACT SetContactInfo(JSONNODE* Item, bool flag = false);
+ MCONTACT SetContactInfo(JSONNODE* Item, bool flag = false, bool self = false);
void RetrieveMyInfo(void);
void OnReceiveMyInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void RetrieveUserInfo(LONG userId);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index d6bcf02c31..1babac70be 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -239,9 +239,9 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) static char fieldsName[] = "id, first_name, last_name, photo_100, bdate, sex, timezone, contacts, online, status, about, domain";
-MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag)
+MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag, bool self)
{
- debugLogA("CVkProto::SetContactInfo");
+ debugLogA("CVkProto::SetContactInfo flag=%d self = %d", flag, self);
if (pItem == NULL)
return -1;
@@ -249,10 +249,16 @@ MCONTACT CVkProto::SetContactInfo(JSONNODE* pItem, bool flag) if (userid == 0)
return -1;
- MCONTACT hContact;
- if (userid == m_myUserId)
- hContact = NULL;
- else if ((hContact = FindUser(userid, flag)) == NULL)
+ MCONTACT hContact = FindUser(userid, flag);
+
+ if (userid == m_myUserId){
+ if (hContact != NULL)
+ if (self)
+ hContact = NULL;
+ else
+ SetContactInfo(pItem, flag, true);
+ }
+ else if (hContact == NULL)
return -1;
CMString tszNick, tszValue;
|