chore: format files for lint
Deploy to VPS / deploy (push) Failing after 8m8s

This commit is contained in:
asepharyana
2026-07-08 01:37:46 +07:00
parent a5cf780a65
commit 9621317a3c
2 changed files with 19 additions and 8 deletions
@@ -1,7 +1,19 @@
import type { PageResult } from "@bete/shared"; import type { PageResult } from "@bete/shared";
import { pgAttachmentsTable, pgMessagesTable } from "@bete/shared"; import { pgAttachmentsTable, pgMessagesTable } from "@bete/shared";
import { createChildLogger } from "@bete/shared/logger"; import { createChildLogger } from "@bete/shared/logger";
import { and, desc, eq, inArray, isNull, like, lt, ne, notInArray, or, type SQL } from "drizzle-orm"; import {
and,
desc,
eq,
inArray,
isNull,
like,
lt,
ne,
notInArray,
or,
type SQL,
} from "drizzle-orm";
import { getDatabase } from "../../shared/database/index.js"; import { getDatabase } from "../../shared/database/index.js";
import { mapMessageRow } from "../../shared/utils/messageMapper.js"; import { mapMessageRow } from "../../shared/utils/messageMapper.js";
import type { import type {
@@ -337,10 +349,7 @@ export class MessagesRepository {
? [ ? [
or( or(
isNull(pgAttachmentsTable.thread_id), isNull(pgAttachmentsTable.thread_id),
notInArray( notInArray(pgAttachmentsTable.thread_id, EXCLUDED_THREAD_IDS),
pgAttachmentsTable.thread_id,
EXCLUDED_THREAD_IDS,
),
)!, )!,
] ]
: []), : []),
@@ -60,9 +60,11 @@ const EXCLUDED_THREAD_IDS = new Set(["1522077685508083893"]);
function isExcludedThread(message: { function isExcludedThread(message: {
channel?: { isThread?: () => boolean; id?: string }; channel?: { isThread?: () => boolean; id?: string };
}): boolean { }): boolean {
return message.channel?.isThread?.() === true return (
&& typeof message.channel.id === "string" message.channel?.isThread?.() === true &&
&& EXCLUDED_THREAD_IDS.has(message.channel.id); typeof message.channel.id === "string" &&
EXCLUDED_THREAD_IDS.has(message.channel.id)
);
} }
function getParentChannelId( function getParentChannelId(