mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
feat: #8524, allow editing category of queued topic
This commit is contained in:
@@ -166,7 +166,7 @@ SocketPosts.reject = async function (socket, data) {
|
||||
};
|
||||
|
||||
async function acceptOrReject(method, socket, data) {
|
||||
const canEditQueue = await posts.canEditQueue(socket.uid, data.id);
|
||||
const canEditQueue = await posts.canEditQueue(socket.uid, data);
|
||||
if (!canEditQueue) {
|
||||
throw new Error('[[error:no-privileges]]');
|
||||
}
|
||||
@@ -174,10 +174,10 @@ async function acceptOrReject(method, socket, data) {
|
||||
}
|
||||
|
||||
SocketPosts.editQueuedContent = async function (socket, data) {
|
||||
if (!data || !data.id || (!data.content && !data.title)) {
|
||||
if (!data || !data.id || (!data.content && !data.title && !data.cid)) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
await posts.editQueuedContent(socket.uid, data.id, data.content, data.title);
|
||||
await posts.editQueuedContent(socket.uid, data);
|
||||
if (data.content) {
|
||||
return await plugins.fireHook('filter:parse.post', { postData: data });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user