Resume voice broadcast on load (#9475)

This commit is contained in:
Michael Weimann 2022-10-21 09:30:02 +02:00 committed by GitHub
parent 493ee425b7
commit 5f59ce182e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 554 additions and 22 deletions

View file

@ -70,7 +70,12 @@ describe("startNewVoiceBroadcastRecording", () => {
getCurrent: jest.fn(),
} as unknown as VoiceBroadcastRecordingsStore;
infoEvent = mkVoiceBroadcastInfoStateEvent(roomId, VoiceBroadcastInfoState.Started, client.getUserId());
infoEvent = mkVoiceBroadcastInfoStateEvent(
roomId,
VoiceBroadcastInfoState.Started,
client.getUserId(),
client.getDeviceId(),
);
otherEvent = mkEvent({
event: true,
type: EventType.RoomMember,
@ -154,7 +159,12 @@ describe("startNewVoiceBroadcastRecording", () => {
describe("when there already is a live broadcast of the current user in the room", () => {
beforeEach(async () => {
room.currentState.setStateEvents([
mkVoiceBroadcastInfoStateEvent(roomId, VoiceBroadcastInfoState.Running, client.getUserId()),
mkVoiceBroadcastInfoStateEvent(
roomId,
VoiceBroadcastInfoState.Running,
client.getUserId(),
client.getDeviceId(),
),
]);
result = await startNewVoiceBroadcastRecording(room, client, recordingsStore);
@ -172,7 +182,12 @@ describe("startNewVoiceBroadcastRecording", () => {
describe("when there already is a live broadcast of another user", () => {
beforeEach(async () => {
room.currentState.setStateEvents([
mkVoiceBroadcastInfoStateEvent(roomId, VoiceBroadcastInfoState.Running, otherUserId),
mkVoiceBroadcastInfoStateEvent(
roomId,
VoiceBroadcastInfoState.Running,
otherUserId,
"ASD123",
),
]);
result = await startNewVoiceBroadcastRecording(room, client, recordingsStore);