fixed double message the second, fixed no own message from diagnotic to aria

This commit is contained in:
2026-03-29 14:24:13 +02:00
parent 6c7b631cb7
commit b7cecb2a8b
3 changed files with 30 additions and 5 deletions
+16 -2
View File
@@ -204,8 +204,22 @@ const ChatScreen: React.FC = () => {
return;
}
// Eigene Nachrichten ignorieren (werden lokal hinzugefuegt)
if (sender === 'user' || sender === 'diagnostic') return;
// Eigene App-Nachrichten ignorieren (werden lokal hinzugefuegt)
if (sender === 'user') return;
// Diagnostic-Nachrichten als User-Nachricht anzeigen
if (sender === 'diagnostic') {
const diagText = (message.payload.text as string) || '';
if (diagText) {
setMessages(prev => [...prev, {
id: nextId(),
sender: 'user',
text: diagText,
timestamp: message.timestamp,
}]);
}
return;
}
const text = (message.payload.text as string) || '';
const ts = message.timestamp;