Skip to content

Commit 23e24ec

Browse files
committed
fix: remove duplicate block-scoped client declaration (TS2448)
The 'client' variable was declared twice in the same block scope (case 'user.message'), causing TypeScript to error with TS2448. The second declaration is redundant — same value as the first.
1 parent e8bdd8a commit 23e24ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/plugin/src/channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ async function handleCloudMessage(
563563
const finalizedCtx = runtime.channel.reply.finalizeInboundContext(msgCtx);
564564

565565
// Create a reply dispatcher that sends responses back through the cloud WSS
566-
const client = getCloudClient(ctx.accountId);
566+
// NOTE: reuses `client` from line ~424 (same block scope, same value)
567567
console.log(`[botschat] client for accountId=${ctx.accountId}: connected=${client?.connected}`);
568568
const deliver = async (payload: { text?: string; mediaUrl?: string }) => {
569569
console.log(`[botschat][deliver] called, connected=${client?.connected}, hasKey=${!!client?.e2eKey}, textLen=${(payload.text || "").length}`);

0 commit comments

Comments
 (0)