Merge pull request #1974 from glifocat/chore/format-chat-sdk-bridge

chore(format): apply prettier to chat-sdk-bridge.ts
This commit is contained in:
gavrielc
2026-04-24 15:25:31 +03:00
committed by GitHub

View File

@@ -125,7 +125,11 @@ export function createChatSdkBridge(config: ChatSdkBridgeConfig): ChannelAdapter
let setupConfig: ChannelSetup; let setupConfig: ChannelSetup;
let gatewayAbort: AbortController | null = null; let gatewayAbort: AbortController | null = null;
async function messageToInbound(message: ChatMessage, isMention: boolean, isGroup?: boolean): Promise<InboundMessage> { async function messageToInbound(
message: ChatMessage,
isMention: boolean,
isGroup?: boolean,
): Promise<InboundMessage> {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const serialized = message.toJSON() as Record<string, any>; const serialized = message.toJSON() as Record<string, any>;
@@ -216,7 +220,11 @@ export function createChatSdkBridge(config: ChatSdkBridgeConfig): ChannelAdapter
// wirings still fire on in-thread mentions. // wirings still fire on in-thread mentions.
chat.onSubscribedMessage(async (thread, message) => { chat.onSubscribedMessage(async (thread, message) => {
const channelId = adapter.channelIdFromThreadId(thread.id); const channelId = adapter.channelIdFromThreadId(thread.id);
await setupConfig.onInbound(channelId, thread.id, await messageToInbound(message, message.isMention === true, true)); await setupConfig.onInbound(
channelId,
thread.id,
await messageToInbound(message, message.isMention === true, true),
);
}); });
// @mention in an unsubscribed thread — SDK-confirmed bot mention. // @mention in an unsubscribed thread — SDK-confirmed bot mention.