fix: tighten edge cases across services (#3158)

This commit is contained in:
Hampus
2026-10-03 13:04:29 +02:00
committed by GitHub
parent a9f7a23c0d
commit 4e6b837ccc
170 changed files with 2028 additions and 421 deletions
@@ -16,8 +16,8 @@ export function isVoiceEngineV2FrameReceivedEvent(event: VoiceEngineV2Event): ev
export function canCoalesceVoiceEngineV2Events(tailEvent: VoiceEngineV2Event, nextEvent: VoiceEngineV2Event): boolean {
if (!isVoiceEngineV2FrameReceivedEvent(nextEvent)) return false;
if (!isVoiceEngineV2FrameReceivedEvent(tailEvent)) return false;
assert.equal(typeof tailEvent.frame.trackSid, 'string', 'tail frame event must carry a string trackSid');
assert.equal(typeof nextEvent.frame.trackSid, 'string', 'next frame event must carry a string trackSid');
assert.equal(typeof tailEvent.frame.trackSid, 'string', 'tail frame event must have a string trackSid');
assert.equal(typeof nextEvent.frame.trackSid, 'string', 'next frame event must have a string trackSid');
return tailEvent.frame.trackSid === nextEvent.frame.trackSid;
}