fix: normalize gateway dev mode detection
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import type { Guild, User } from "@buape/carbon";
|
||||
|
||||
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "../../channels/channel-config.js";
|
||||
import {
|
||||
buildChannelKeyCandidates,
|
||||
resolveChannelEntryMatch,
|
||||
} from "../../channels/channel-config.js";
|
||||
import { formatDiscordUserTag } from "./format.js";
|
||||
|
||||
export type DiscordAllowList = {
|
||||
|
||||
@@ -266,7 +266,9 @@ export async function preflightDiscordMessage(
|
||||
channelConfig?.matchSource ?? "none"
|
||||
}`;
|
||||
if (isGuildMessage && channelConfig?.enabled === false) {
|
||||
logVerbose(`Blocked discord channel ${message.channelId} (channel disabled, ${channelMatchMeta})`);
|
||||
logVerbose(
|
||||
`Blocked discord channel ${message.channelId} (channel disabled, ${channelMatchMeta})`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -535,7 +535,7 @@ async function dispatchDiscordCommandInteraction(params: {
|
||||
threadChannel: {
|
||||
id: rawChannelId,
|
||||
name: channelName,
|
||||
parentId: "parentId" in channel ? channel.parentId ?? undefined : undefined,
|
||||
parentId: "parentId" in channel ? (channel.parentId ?? undefined) : undefined,
|
||||
parent: undefined,
|
||||
},
|
||||
channelInfo,
|
||||
|
||||
Reference in New Issue
Block a user