fix(protocol): attach voice waveforms on outgoing records
Private-chat clients only draw the progress track from message metadata. Compute amplitudes when uploading a record so PC and phone show the bar.
This commit is contained in:
6 files changed
+344
-1
No files matched your search
@@ -56,6 +56,14 @@ describe('ptt-upload', () => {
|
||||
const c2cFlags = (args.extBizInfo as any).ptt.bytesGeneralFlags;
|
||||
expect(c2cFlags.length).toBe(14);
|
||||
expect(c2cFlags[0]).toBe(0x9a);
|
||||
expect((args.extBizInfo as any).ptt.waveform).toBeUndefined();
|
||||
});
|
||||
|
||||
it('fingerprint path does not invent a waveform', async () => {
|
||||
await uploadPttMsgInfo({} as any, true, 12345, FINGERPRINT);
|
||||
const args = vi.mocked(pipeline.runNtv2Upload).mock.calls[0]![0];
|
||||
expect((args.extBizInfo as any).ptt.waveform).toBeUndefined();
|
||||
expect(pipeline.finalizeMediaMsgInfo).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it('fingerprint payload: zero bytes, fastOnlyError ready, voiceFormat defaults to 1', async () => {
|
||||
|
||||
Reference in new issue
Block a user