Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sidecar/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ function pushToChannel(frame: SayFrame): void {
void mcp.notification({
method: "notifications/claude/channel",
params: {
content: `${user}: ${content}`,
// Body only. The speaker rides in meta, which the host renders itself —
// putting the name here too produced "マスター: マスター: ハロ~" (#28),
// and it leaves the body no longer equal to what was said.
content,
meta: {
chat_id: CHAT_ID,
message_id: frame.message_id ?? randomUUID(),
Expand Down
4 changes: 3 additions & 1 deletion sidecar/test/round-trip.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ test("room say reaches the channel, and say_to_room reaches the room", async (t)
);

const pushed = await nextNotification("notifications/claude/channel");
assert.match(pushed.params.content, /Master: 聞こえる?/);
// Body only: the speaker belongs in meta, and the host renders it. Mixing it
// into the body showed the name twice on screen (#28).
assert.equal(pushed.params.content, "聞こえる?");
assert.equal(pushed.params.meta.chat_id, "test-room");
assert.equal(pushed.params.meta.message_id, "m-1");
assert.equal(pushed.params.meta.user, "Master");
Expand Down
Loading