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 <noreply@anthropic.com>
This commit is contained in:
parent
7775ba5ca9
commit
d9ba793fee
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue