summaryrefslogtreecommitdiff
path: root/lib/realtime.js
diff options
context:
space:
mode:
authorMax Wu2018-02-26 16:43:29 +0800
committerMax Wu2018-02-26 16:43:29 +0800
commitbaa0418fb54fb8f158267f8e8b5f248232dc0a8f (patch)
tree61d8b9b25a592c59e4a5cc6026e0f0280ef11367 /lib/realtime.js
parent912cce2b40689310333d6388fd82ff354051a7ac (diff)
Remove and replace all note id compression in LZString with base64url
Signed-off-by: Max Wu <jackymaxj@gmail.com>
Diffstat (limited to 'lib/realtime.js')
-rw-r--r--lib/realtime.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index d6ba62b2..5ee9f8fd 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -5,7 +5,6 @@ var cookie = require('cookie')
var cookieParser = require('cookie-parser')
var url = require('url')
var async = require('async')
-var LZString = require('lz-string')
var randomcolor = require('randomcolor')
var Chance = require('chance')
var chance = new Chance()
@@ -703,7 +702,7 @@ function operationCallback (socket, operation) {
}
function updateHistory (userId, note, time) {
- var noteId = note.alias ? note.alias : LZString.compressToBase64(note.id)
+ var noteId = note.alias ? note.alias : models.Note.encodeNoteId(note.id)
if (note.server) history.updateHistory(userId, noteId, note.server.document, time)
}