This commit is contained in:
2026-08-07 22:14:23 +02:00
parent 4fd15ec338
commit c9f5dc02fa
3 changed files with 12 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ export default async bot => {
rows = await db`
select id, mime, username, size
from "items"
where id >= ${randomId} and active = true
where id >= ${randomId} and active = true and coalesce(visibility, 0) = 0
order by id asc
limit 1
`;
@@ -43,7 +43,7 @@ export default async bot => {
rows = await db`
select id, mime, username, size
from "items"
where active = true
where active = true and coalesce(visibility, 0) = 0
order by id asc
limit 1
`;
@@ -54,7 +54,7 @@ export default async bot => {
rows = await db`
select id, mime, username, size
from "items"
where
where active = true and coalesce(visibility, 0) = 0 and
${args.map(a => a.charAt(0) === "!"
? db`username not ilike ${a.slice(1)}`
: db`username ilike ${a}`