From d9ba793feed75c5d1cfb4b50fb6d8074150ef16e Mon Sep 17 00:00:00 2001 From: yushen Date: Fri, 30 Jan 2026 14:46:30 +0800 Subject: [PATCH] fix(gateway): extract content from payload in received messages Display payload.content instead of raw JSON when the payload is an object with a content field. Co-Authored-By: Claude Opus 4.5 --- src/gateway/public/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gateway/public/index.html b/src/gateway/public/index.html index 7aa9d01d..421ba06d 100644 --- a/src/gateway/public/index.html +++ b/src/gateway/public/index.html @@ -674,7 +674,8 @@ }); socket.on('receive', (msg) => { - const content = typeof msg.payload === 'string' ? msg.payload : JSON.stringify(msg.payload); + const p = msg.payload; + const content = typeof p === 'string' ? p : (p && p.content ? p.content : JSON.stringify(p)); appendMsg('in', content, msg.from); });