nodejs: set users by parts

This commit is contained in:
Sergey Linnik
2025-05-31 23:08:54 +03:00
parent d533cca184
commit cf1541bf3a
2 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# Change Log
- nodejs: set users by parts
- ur skin language
- nodejs: preload frame moved from uploading popap
- change preload.html address

View File

@ -225,10 +225,27 @@
users = <%- JSON.stringify(usersForMentions) %>;
}
docEditor.setUsers({
if ((c === "protect" || c === "mention") && users && event.data.count) {
let from = event.data.from;
let count = event.data.count;
let search = event.data.search;
if (from != 0) users = [];
var resultCount = 234;
for (var i = Math.max(users.length, from); i < Math.min(from + count, resultCount); i++){
users.push({
email: "test@test.test" + (i + 1),
id: "id" + (i + 1),
name: "test_" + search + (i + 1)
});
}
}
var result = {
"c": c,
"users": users,
});
};
if (resultCount) result.total = resultCount;
docEditor.setUsers(result);
};
var onRequestSendNotify = function(event) { // the user is mentioned in a comment