feat: #8521, allow editing title before posting from queue

This commit is contained in:
Barış Soner Uşaklı
2020-07-20 21:28:17 -04:00
parent 8ddc8dd10f
commit 2485a55092
5 changed files with 45 additions and 14 deletions

View File

@@ -174,10 +174,10 @@ async function acceptOrReject(method, socket, data) {
}
SocketPosts.editQueuedContent = async function (socket, data) {
if (!data || !data.id || !data.content) {
if (!data || !data.id || (!data.content && !data.title)) {
throw new Error('[[error:invalid-data]]');
}
await posts.editQueuedContent(socket.uid, data.id, data.content);
await posts.editQueuedContent(socket.uid, data.id, data.content, data.title);
return await plugins.fireHook('filter:parse.post', { postData: data });
};