Implement voice broadcast last_chunk_sequence (#9513)

This commit is contained in:
Michael Weimann 2022-10-27 16:24:03 +02:00 committed by GitHub
parent 07003a5bc1
commit c497046e39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 22 deletions

View file

@ -56,6 +56,7 @@ export interface VoiceBroadcastInfoEventContent {
device_id: string;
state: VoiceBroadcastInfoState;
chunk_length?: number;
last_chunk_sequence?: number;
["m.relates_to"]?: {
rel_type: RelationType;
event_id: string;

View file

@ -21,6 +21,7 @@ import { TypedEventEmitter } from "matrix-js-sdk/src/models/typed-event-emitter"
import {
ChunkRecordedPayload,
createVoiceBroadcastRecorder,
VoiceBroadcastInfoEventContent,
VoiceBroadcastInfoEventType,
VoiceBroadcastInfoState,
VoiceBroadcastRecorder,
@ -207,11 +208,12 @@ export class VoiceBroadcastRecording
{
device_id: this.client.getDeviceId(),
state,
last_chunk_sequence: this.sequence,
["m.relates_to"]: {
rel_type: RelationType.Reference,
event_id: this.infoEvent.getId(),
},
},
} as VoiceBroadcastInfoEventContent,
this.client.getUserId(),
);
}