diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-09-24 03:44:59 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-09-24 03:44:59 +0000 |
commit | 1327fc6976d246fe73be1a73b9fb58767b8dc635 (patch) | |
tree | 6b88bd87585c0e100d8bc7785d2b2f353c8cfca2 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 037511a364629d200c22cd08e0fa4922f2429bfc (diff) |
VKontakte:
fix(?) user status processing
rework remove unread message status from clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@15430 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index c48a330ef6..9aa1585f20 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -403,17 +403,18 @@ void CVkProto::RetrieveUsersInfo(bool flag) userIDs.AppendFormat(_T("%i"), userID);
}
- CMString codeformat("var userIDs=\"%s\";");
+ CMString codeformat("var userIDs=\"%s\";var _fields=\"%s\";");
if (m_bNeedSendOnline)
codeformat += _T("API.account.setOnline();");
if (flag && !m_bLoadFullCList)
- codeformat += CMString("var US=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});"
+ codeformat += CMString("var US=API.users.get({\"user_ids\":userIDs,\"fields\":_fields,\"name_case\":\"nom\"});"
+ "var _US=API.users.get({\"user_ids\":userIDs,\"fields\":_fields,\"name_case\":\"nom\"});if(_US.length>US.length)US=_US;"
"var res=[];var index=US.length;while(index>0){index=index-1;if(US[index].online!=0){res.unshift(US[index]);};};"
"return{\"freeoffline\":1,\"users\":res,\"requests\":API.friends.getRequests({\"extended\":0,\"need_mutual\":0,\"out\":0})};");
else
- codeformat += CMString("var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});"
+ codeformat += CMString("var res=API.users.get({\"user_ids\":userIDs,\"fields\":_fields,\"name_case\":\"nom\"});"
"return{\"freeoffline\":0,\"users\":res,\"requests\":API.friends.getRequests({\"extended\":0,\"need_mutual\":0,\"out\":0})};");
code.AppendFormat(codeformat, userIDs, CMString(flag ? "online,status" : fieldsName));
|