This commit is contained in:
2026-08-11 17:59:24 +02:00
parent e894795fe0
commit 07a874ec99
4 changed files with 42 additions and 9 deletions

View File

@@ -807,8 +807,8 @@ export default router => {
}
}
// Broadcast new_item event for live grid updates (only if auto-approved and public)
if (!isApprovalRequired && targetVisibility === 0) {
// Broadcast new_item event for live grid updates (only if auto-approved)
if (!isApprovalRequired) {
try {
await db`SELECT pg_notify('new_item', ${JSON.stringify({
id: itemid,
@@ -817,7 +817,9 @@ export default router => {
username: session.user,
display_name: session.display_name || null,
tag_id: effectiveRating ? (effectiveRating === 'sfw' ? 1 : (effectiveRating === 'nsfw' ? 2 : (cfg.nsfl_tag_id || 3))) : 0,
is_oc: !!is_oc
is_oc: !!is_oc,
slug: itemSlug,
visibility: targetVisibility
})})`;
} catch (err) {
console.error('[UPLOAD-URL] new_item notify failed:', err);