mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-30 04:50:41 +02:00
feat: closes #13961, rename ban-reasons to custom reasons
use them for ban, mute and post queue depending on the type selected if type is set to all, the reason is displayed in ban/mute and post queue move reason label + dropdown + textarea to a partial
This commit is contained in:
@@ -592,7 +592,10 @@ postsAPI.removeQueuedPost = async (caller, data) => {
|
||||
await canEditQueue(caller.uid, data, 'reject');
|
||||
const result = await posts.removeFromQueue(data.id);
|
||||
if (result && caller.uid !== parseInt(result.uid, 10)) {
|
||||
await sendQueueNotification('post-queue-rejected', result.uid, '/');
|
||||
const msg = validator.escape(String(data.message ? data.message : ''));
|
||||
await sendQueueNotification(
|
||||
msg ? 'post-queue-rejected-for-reason' : 'post-queue-rejected', result.uid, '/', msg
|
||||
);
|
||||
}
|
||||
await logQueueEvent(caller, result, 'reject');
|
||||
};
|
||||
@@ -612,7 +615,7 @@ postsAPI.notifyQueuedPostOwner = async (caller, data) => {
|
||||
await canEditQueue(caller.uid, data, 'notify');
|
||||
const result = await posts.getFromQueue(data.id);
|
||||
if (result) {
|
||||
await sendQueueNotification('post-queue-notify', result.uid, `/post-queue/${data.id}`, validator.escape(String(data.message)));
|
||||
await sendQueueNotification('post-queue-notify', result.uid, `/post-queue/${data.id}`, validator.escape(String(data.message || '')));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user