Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormrDoctorWho <mrdoctorwho@gmail.com>2015-05-01 00:15:39 +0300
committermrDoctorWho <mrdoctorwho@gmail.com>2015-05-01 00:15:39 +0300
commitdb435ae3df3111b103b65f1934d39320199004f8 (patch)
tree26db179a127406dae2ae473b257fb176ebccc5a0 /js
parent1b433ccdc6e7c1516442cbba4e2a7cfe3c5d92b2 (diff)
Meet NT compatibility
Update documentation
Diffstat (limited to 'js')
-rw-r--r--js/getChats.js3
-rw-r--r--js/getLastTime.js5
-rw-r--r--js/getPhotos.js3
-rw-r--r--js/getUserID.js6
4 files changed, 15 insertions, 2 deletions
diff --git a/js/getChats.js b/js/getChats.js
index d9f29c2..8000cde 100644
--- a/js/getChats.js
+++ b/js/getChats.js
@@ -1,3 +1,6 @@
+// Searches for chats in dialogs
+// Return chat object with it's users
+
var dialogs = API.messages.searchDialogs({"limit":200});
var len = dialogs.length;
var chats = [];
diff --git a/js/getLastTime.js b/js/getLastTime.js
index c621cb5..efe8297 100644
--- a/js/getLastTime.js
+++ b/js/getLastTime.js
@@ -1,3 +1,6 @@
+// It makes no sense and not required at all
+// Allows to get user's last activity
+
var uid = Args.uid;
-var time = API.messages.getLastActivity({"user_id": uid});
+var time = API.messages.getLastActivity({"user_id": uid});
return time.time;
diff --git a/js/getPhotos.js b/js/getPhotos.js
index 5b2b5dd..690ec31 100644
--- a/js/getPhotos.js
+++ b/js/getPhotos.js
@@ -1,3 +1,6 @@
+// Gets a photo link for each user in argument users
+// Returns a list of {"uid": id, "photo": url}
+
var users = Args.users;
var photoSize = Args.size;
var data = API.users.get({"user_ids":users, fields:[photoSize]});
diff --git a/js/getUserID.js b/js/getUserID.js
index 9dc8a04..37d8c61 100644
--- a/js/getUserID.js
+++ b/js/getUserID.js
@@ -1,2 +1,6 @@
-var data = API.users.get();
+// Makes no sense just like getLastTime
+// Used to prevent getting wrong answer from VK API
+// They usually block or don't answer for usual queries
+// But they always offer to use execute. So, why not?
+var data = API.users.get();
return data[0].uid;