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

getMessagesBulk.js « js - github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 765c9786bb4b62cece1e60e05f38bbbdd2c0fdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Allows to receive conversations' logs for up to 25 users
var users = Args.users.split(",");
var startMessageId = Args.start_message_id;
if (startMessageId == null) {
    startMessageId = 0;
}
var history = [];
var user;
var length = users.length;
while (length > 0) {
    var uid = users[length - 1];
    var userHistory = API.messages.getHistory({"user_id":uid, "start_message_id": startMessageId, "count": Args.count});
    history.push(userHistory);
    length = length - 1;
}
return history;