filter own sender to hide own messages, these ar sendet from rvs twice

This commit is contained in:
duffyduck 2026-03-29 16:15:10 +02:00
parent b86c4a0d1a
commit a012ec65ef
1 changed files with 3 additions and 1 deletions

View File

@ -492,8 +492,10 @@ function connectRVS(forcePlain) {
const msg = JSON.parse(raw.toString());
if (msg.type === "chat" && msg.payload) {
const sender = msg.payload.sender || "?";
// Eigene Nachrichten ignorieren (Echo)
if (sender === "diagnostic") return;
log("info", "rvs", `Chat von ${sender}: "${(msg.payload.text || "").slice(0, 100)}"`);
if (pipelineActive && sender !== "diagnostic") {
if (pipelineActive) {
pipelineEnd(true, `Antwort via RVS von ${sender}: "${(msg.payload.text || "").slice(0, 120)}"`);
}
broadcast({ type: "rvs_chat", msg });