mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
topics should be marked read correctly if you are already in it
This commit is contained in:
@@ -104,15 +104,15 @@ SocketPosts.edit = function(socket, data, callback) {
|
||||
type: 'warning',
|
||||
timeout: 2000
|
||||
});
|
||||
return;
|
||||
return callback(new Error('not-logged-in'));
|
||||
} else if(!data || !data.pid || !data.title || !data.content) {
|
||||
return callback(new Error('invalid data'));
|
||||
} else if (!data.title || data.title.length < parseInt(meta.config.minimumTitleLength, 10)) {
|
||||
topics.emitTitleTooShortAlert(socket);
|
||||
return;
|
||||
return callback(new Error('title-too-short'));
|
||||
} else if (!data.content || data.content.length < parseInt(meta.config.minimumPostLength, 10)) {
|
||||
module.parent.exports.emitContentTooShortAlert(socket);
|
||||
return;
|
||||
return callback(new Error('content-too-short'));
|
||||
}
|
||||
|
||||
postTools.edit(socket.uid, data.pid, data.title, data.content);
|
||||
|
||||
Reference in New Issue
Block a user