Skip to content

Commit 0d9ae3b

Browse files
authored
fix(mcp): set chatID for send message
1 parent cc512ec commit 0d9ae3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/mcp-server/src/handlers/send-message.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import type { HandlerFunction } from '../tools/types';
22
import { asMarkdownContentResult, createOpenLink } from './utils';
33

44
export const handler: HandlerFunction = async (client, args) => {
5-
const body = args as any;
6-
const output = await client.messages.send(body);
5+
const { chatID, ...body } = args as any;
6+
const output = await client.messages.send(chatID, body);
77

88
const lines: string[] = [];
99
if (output.pendingMessageID) {
10-
const deeplink = createOpenLink('', body?.chatID ?? '');
10+
const deeplink = createOpenLink('', chatID ?? '');
1111
if (deeplink) lines.push(`**Open the chat in Beeper**: ${deeplink}`);
1212
} else {
1313
lines.push('Failed to send message.');

0 commit comments

Comments
 (0)