hdf
This commit is contained in:
@@ -10,6 +10,7 @@ import { getManualApproval, getMinTags, getTrustedUploads, getBypassDuplicateChe
|
||||
import { parseMultipart, collectBody } from "./inc/multipart.mjs";
|
||||
import f0cklib from "./inc/routeinc/f0cklib.mjs";
|
||||
import { calculateExpiresAt } from "./inc/routes/apiv2/upload.mjs";
|
||||
import { addPrivateItem } from "./inc/private_items.mjs";
|
||||
|
||||
|
||||
// Derive archive MIME types from cfg.mimes — any application/* that isn't swf or pdf.
|
||||
@@ -361,6 +362,10 @@ export const handleUpload = async (req, res, self) => {
|
||||
RETURNING id
|
||||
`;
|
||||
|
||||
if (targetVisibility === 2) {
|
||||
addPrivateItem(itemid, filename, req.session.user);
|
||||
}
|
||||
|
||||
try {
|
||||
await db`INSERT INTO comment_subscriptions (user_id, item_id) VALUES (${req.session.id}, ${itemid}) ON CONFLICT DO NOTHING`;
|
||||
} catch (err) {}
|
||||
@@ -758,6 +763,10 @@ export const handleUpload = async (req, res, self) => {
|
||||
|
||||
const itemid = await queue.getItemID(filename);
|
||||
|
||||
if (targetVisibility === 2) {
|
||||
addPrivateItem(itemid, filename, req.session.user);
|
||||
}
|
||||
|
||||
// Automatically subscribe uploader to comment thread
|
||||
try {
|
||||
await db`
|
||||
|
||||
Reference in New Issue
Block a user