fix: guest note not save

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-06-12 19:47:07 +08:00
parent 3494922cdb
commit 375de57af6
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38

View File

@ -664,9 +664,9 @@ function operationCallback(socket, operation) {
return logger.error('operation callback failed: ' + err) return logger.error('operation callback failed: ' + err)
}) })
} }
note.server.isDirty = true
note.tempUsers[userId] = Date.now() note.tempUsers[userId] = Date.now()
} }
note.server.isDirty = true
// save authorship - use timer here because it's an O(n) complexity algorithm // save authorship - use timer here because it's an O(n) complexity algorithm
setImmediate(function () { setImmediate(function () {
note.authorship = Note.updateAuthorshipByOperation(operation, userId, note.authorship) note.authorship = Note.updateAuthorshipByOperation(operation, userId, note.authorship)