Merge pull request #677 from hackmdio/realtime-minor-typos

Fix minor typos in realtime
This commit is contained in:
Christoph (Sheogorath) Kern 2018-01-16 16:28:14 +07:00 committed by GitHub
commit 5f84906b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -709,7 +709,7 @@ function connection (socket) {
return failConnection(404, 'note id not found', socket)
}
if (isDuplicatedInSocketQueue(socket, connectionSocketQueue)) return
if (isDuplicatedInSocketQueue(connectionSocketQueue, socket)) return
// store noteId in this socket session
socket.noteId = noteId
@ -723,8 +723,8 @@ function connection (socket) {
var maxrandomcount = 10
var found = false
do {
Object.keys(notes[noteId].users).forEach(function (user) {
if (user.color === color) {
Object.keys(notes[noteId].users).forEach(function (userId) {
if (notes[noteId].users[userId].color === color) {
found = true
}
})