summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/realtime.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index a05c1f41..c6c9ffeb 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -64,6 +64,7 @@ function secure(socket, next) {
function emitCheck(note) {
var out = {
+ title: note.title,
updatetime: note.updatetime,
lastchangeuser: note.lastchangeuser,
lastchangeuserprofile: note.lastchangeuserprofile,
@@ -149,7 +150,7 @@ function updateNote(note, callback) {
function finishUpdateNote(note, _note, callback) {
if (!note || !note.server) return callback(null, null);
var body = note.server.document;
- var title = models.Note.parseNoteTitle(body);
+ var title = note.title = models.Note.parseNoteTitle(body);
title = LZString.compressToBase64(title);
body = LZString.compressToBase64(body);
var values = {
@@ -313,6 +314,7 @@ function emitRefresh(socket) {
if (!noteId || !notes[noteId]) return;
var note = notes[noteId];
var out = {
+ title: note.title,
docmaxlength: config.documentmaxlength,
owner: note.owner,
ownerprofile: note.ownerprofile,
@@ -476,6 +478,7 @@ function startConnection(socket) {
notes[noteId] = {
id: noteId,
alias: note.alias,
+ title: LZString.decompressFromBase64(note.title),
owner: owner,
ownerprofile: ownerprofile,
permission: note.permission,