mcp-chat-connect 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -98,12 +98,17 @@ function connectWebSocket() {
|
|
|
98
98
|
|
|
99
99
|
if (data.type === 'new_message') {
|
|
100
100
|
const msg = data.message;
|
|
101
|
-
// Don't echo back messages sent by this
|
|
102
|
-
|
|
101
|
+
// Don't echo back messages sent by this Claude session itself
|
|
102
|
+
// But DO receive messages from the same user's browser UI
|
|
103
|
+
if (msg.session_id === sessionState.sessionToken) return;
|
|
104
|
+
|
|
105
|
+
const senderLabel = msg.session_id
|
|
106
|
+
? `${msg.user_name?.split(' ')[0]}'s Claude`
|
|
107
|
+
: msg.user_name || 'unknown';
|
|
103
108
|
|
|
104
109
|
pushChannelMessage('mcp-chat', msg.content, {
|
|
105
110
|
channel: sessionState.channelName,
|
|
106
|
-
user:
|
|
111
|
+
user: senderLabel,
|
|
107
112
|
message_type: msg.message_type || 'info',
|
|
108
113
|
timestamp: msg.created_at || new Date().toISOString(),
|
|
109
114
|
});
|
package/package.json
CHANGED