fixed double message the second, fixed no own message from diagnotic to aria
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
</div>
|
||||
<div id="chat-box-fs" class="chat-box" style="flex:1;max-height:none;min-height:0;overflow-y:auto;"></div>
|
||||
<div class="input-row" style="margin-top:8px;">
|
||||
<input type="text" id="chat-input-fs" placeholder="Nachricht an ARIA..." onkeydown="if(event.key==='Enter'){testGatewayFS();event.preventDefault();}">
|
||||
<input type="text" id="chat-input-fs" placeholder="Nachricht an ARIA..." onkeydown="if(event.key==='Enter'){testRVSFS();event.preventDefault();}">
|
||||
<button class="btn" onclick="testGatewayFS()">Gateway senden</button>
|
||||
<button class="btn" onclick="testRVSFS()">Via RVS senden</button>
|
||||
</div>
|
||||
@@ -519,7 +519,9 @@
|
||||
if (msg.type === 'rvs_chat') {
|
||||
const p = msg.msg.payload || {};
|
||||
const sender = p.sender || '?';
|
||||
const chatType = (sender === 'aria') ? 'received' : 'sent';
|
||||
// ARIA-Antworten kommen schon via Gateway (chat:final) — nicht nochmal via RVS anzeigen
|
||||
if (sender === 'aria') return;
|
||||
const chatType = 'sent';
|
||||
const label = sender === 'stt' ? '\uD83C\uDFA4 Spracheingabe' : `via RVS (${sender})`;
|
||||
addChat(chatType, p.text || '?', label);
|
||||
return;
|
||||
@@ -997,7 +999,7 @@
|
||||
|
||||
// Enter-Taste sendet via Gateway
|
||||
document.getElementById('chat-input').addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') testGateway();
|
||||
if (e.key === 'Enter') testRVS();
|
||||
});
|
||||
|
||||
// Escape schliesst Lightbox
|
||||
|
||||
Reference in New Issue
Block a user