mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Поправил баг с числом пользователей на авторизации после waitAuth
git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/nodeJSProjects@56705 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
@ -462,23 +462,25 @@ exports.install = function (server, callbackFunction) {
|
||||
participants = getParticipants(docId);
|
||||
}
|
||||
|
||||
var conn;
|
||||
var connection;
|
||||
var participantsMap = _.map(participants, function (conn) {
|
||||
return {id: conn.connection.userId,
|
||||
username: conn.connection.userName, color: conn.connection.userColor};});
|
||||
|
||||
_.each(participants, function (participant) {
|
||||
conn = participant.connection;
|
||||
sendData(conn, {
|
||||
type : "auth",
|
||||
result : 1,
|
||||
sessionId : conn.sessionId,
|
||||
participants : participantsMap,
|
||||
messages : messages[conn.docid],
|
||||
locks : locks[conn.docId],
|
||||
changes : objChanges[conn.docId],
|
||||
indexUser : indexUser[conn.docId]
|
||||
});
|
||||
connection = participant.connection;
|
||||
if (userId !== connection.userId) {
|
||||
sendData(connection, {
|
||||
type: "auth",
|
||||
result: 1,
|
||||
sessionId: connection.sessionId,
|
||||
participants: participantsMap,
|
||||
messages: messages[connection.docid],
|
||||
locks: locks[connection.docId],
|
||||
changes: objChanges[connection.docId],
|
||||
indexUser: indexUser[connection.docId]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
result = true;
|
||||
@ -1029,7 +1031,7 @@ exports.install = function (server, callbackFunction) {
|
||||
|
||||
var participants = getParticipants(docId, userId);
|
||||
// Для данного пользователя снимаем Lock с документа
|
||||
if (!checkEndAuthLock(docId, userId, participants)) {
|
||||
if (!checkEndAuthLock(docId, userId)) {
|
||||
var arrLocks = _.map(userLocks, function (e) {
|
||||
return {
|
||||
block:e.block,
|
||||
|
||||
Reference in New Issue
Block a user