fixed double message the second, fixed no own message from diagnotic to aria
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user