diff --git a/sidecar/src/index.ts b/sidecar/src/index.ts index fa31128..005dbfd 100644 --- a/sidecar/src/index.ts +++ b/sidecar/src/index.ts @@ -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(), diff --git a/sidecar/test/round-trip.test.mjs b/sidecar/test/round-trip.test.mjs index 4d9234a..ad33ec1 100644 --- a/sidecar/test/round-trip.test.mjs +++ b/sidecar/test/round-trip.test.mjs @@ -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");