mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
nodejs: set users by parts
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user