mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
Для пользователя, который подключился в guid добавляею counter (для того, чтобы один и тот же пользователь с таким же guid-ом мог 2 раза открыть на редактирование/просмотр документ)
git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/nodeJSProjects@51098 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
@ -499,8 +499,15 @@ exports.install = function (server, callbackFunction) {
|
||||
//TODO: Send some shit back
|
||||
}
|
||||
|
||||
// Увеличиваем индекс обращения к документу
|
||||
if (!indexuser.hasOwnProperty(conn.docId)) {
|
||||
indexuser[conn.docId] = 1;
|
||||
} else {
|
||||
indexuser[conn.docId] += 1;
|
||||
}
|
||||
|
||||
conn.sessionState = 1;
|
||||
conn.userId = data.user;
|
||||
conn.userId = data.user + indexuser[conn.docId];
|
||||
conn.userName = data.username;
|
||||
conn.serverHost = data.serverHost;
|
||||
conn.serverPath = data.serverPath;
|
||||
@ -520,13 +527,6 @@ exports.install = function (server, callbackFunction) {
|
||||
connections.push({connection:conn});
|
||||
var participants = getParticipants(data.docid, data.user);
|
||||
|
||||
// Увеличиваем индекс обращения к документу
|
||||
if (!indexuser.hasOwnProperty(conn.docId)) {
|
||||
indexuser[conn.docId] = 1;
|
||||
} else {
|
||||
indexuser[conn.docId] += 1;
|
||||
}
|
||||
|
||||
sendData(conn,
|
||||
{
|
||||
type:"auth",
|
||||
@ -540,7 +540,7 @@ exports.install = function (server, callbackFunction) {
|
||||
changes:objchanges[conn.docId],
|
||||
indexuser:indexuser[conn.docId]
|
||||
});//Or 0 if fails
|
||||
sendParticipantsState(participants, true, data.user, data.username);
|
||||
sendParticipantsState(participants, true, conn.userId, conn.userName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user