breaking: remove socket.emit('posts.edit')

This commit is contained in:
Barış Soner Uşaklı
2021-12-09 18:42:43 -05:00
parent f7418ccd47
commit 4247f62441
4 changed files with 88 additions and 88 deletions

View File

@@ -46,6 +46,9 @@ postsAPI.edit = async function (caller, data) {
if (!data || !data.pid || (meta.config.minimumPostLength !== 0 && !data.content)) {
throw new Error('[[error:invalid-data]]');
}
if (!caller.uid) {
throw new Error('[[error:not-logged-in]]');
}
// Trim and remove HTML (latter for composers that send in HTML, like redactor)
const contentLen = utils.stripHTMLTags(data.content).trim().length;