zebra-report: sync chat page — drop self-echo frames at onRxFrame entry
This commit is contained in:
parent
695b6af58f
commit
b74e838d35
1 changed files with 9 additions and 0 deletions
|
|
@ -772,6 +772,15 @@ async function onRxFrame(bytes) {
|
|||
logLine('err', `rx: malformed frame (type=${f.type}, ${f.error})`);
|
||||
return;
|
||||
}
|
||||
/* same-machine PA mix echoes our own carrier back to us. drop any frame
|
||||
* whose sender id matches our own so we don't double-render. loopback
|
||||
* mode is unaffected because BroadcastChannel never echoes to sender. */
|
||||
if (f.sid) {
|
||||
const mine = await senderIdBytes();
|
||||
let isSelf = true;
|
||||
for (let i = 0; i < 4; i++) if (f.sid[i] !== mine[i]) { isSelf = false; break; }
|
||||
if (isSelf) return;
|
||||
}
|
||||
if (f.type === T_OFFER) {
|
||||
logLine('sys', `rx: OFFER from peer — ${f.baud} baud`);
|
||||
/* respond with READY at handshake baud */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue