Include device_id in voice broadcast info events (#9394)
parent
bac6e12946
commit
19bc3f1d9a
|
@ -40,6 +40,7 @@ export enum VoiceBroadcastInfoState {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VoiceBroadcastInfoEventContent {
|
export interface VoiceBroadcastInfoEventContent {
|
||||||
|
device_id: string;
|
||||||
state: VoiceBroadcastInfoState;
|
state: VoiceBroadcastInfoState;
|
||||||
chunk_length?: number;
|
chunk_length?: number;
|
||||||
["m.relates_to"]?: {
|
["m.relates_to"]?: {
|
||||||
|
|
|
@ -146,6 +146,7 @@ export class VoiceBroadcastRecording
|
||||||
this.infoEvent.getRoomId(),
|
this.infoEvent.getRoomId(),
|
||||||
VoiceBroadcastInfoEventType,
|
VoiceBroadcastInfoEventType,
|
||||||
{
|
{
|
||||||
|
device_id: this.client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Stopped,
|
state: VoiceBroadcastInfoState.Stopped,
|
||||||
["m.relates_to"]: {
|
["m.relates_to"]: {
|
||||||
rel_type: RelationType.Reference,
|
rel_type: RelationType.Reference,
|
||||||
|
|
|
@ -65,6 +65,7 @@ export const startNewVoiceBroadcastRecording = async (
|
||||||
roomId,
|
roomId,
|
||||||
VoiceBroadcastInfoEventType,
|
VoiceBroadcastInfoEventType,
|
||||||
{
|
{
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Started,
|
state: VoiceBroadcastInfoState.Started,
|
||||||
chunk_length: 300,
|
chunk_length: 300,
|
||||||
} as VoiceBroadcastInfoEventContent,
|
} as VoiceBroadcastInfoEventContent,
|
||||||
|
|
|
@ -160,6 +160,7 @@ describe("VoiceBroadcastRecording", () => {
|
||||||
describe("when created for a Voice Broadcast Info without relations", () => {
|
describe("when created for a Voice Broadcast Info without relations", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
infoEvent = mkVoiceBroadcastInfoEvent({
|
infoEvent = mkVoiceBroadcastInfoEvent({
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Started,
|
state: VoiceBroadcastInfoState.Started,
|
||||||
});
|
});
|
||||||
setUpVoiceBroadcastRecording();
|
setUpVoiceBroadcastRecording();
|
||||||
|
@ -179,6 +180,7 @@ describe("VoiceBroadcastRecording", () => {
|
||||||
roomId,
|
roomId,
|
||||||
VoiceBroadcastInfoEventType,
|
VoiceBroadcastInfoEventType,
|
||||||
{
|
{
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Stopped,
|
state: VoiceBroadcastInfoState.Stopped,
|
||||||
["m.relates_to"]: {
|
["m.relates_to"]: {
|
||||||
rel_type: RelationType.Reference,
|
rel_type: RelationType.Reference,
|
||||||
|
@ -344,6 +346,7 @@ describe("VoiceBroadcastRecording", () => {
|
||||||
describe("when created for a Voice Broadcast Info with a Stopped relation", () => {
|
describe("when created for a Voice Broadcast Info with a Stopped relation", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
infoEvent = mkVoiceBroadcastInfoEvent({
|
infoEvent = mkVoiceBroadcastInfoEvent({
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Started,
|
state: VoiceBroadcastInfoState.Started,
|
||||||
chunk_length: 300,
|
chunk_length: 300,
|
||||||
});
|
});
|
||||||
|
@ -353,6 +356,7 @@ describe("VoiceBroadcastRecording", () => {
|
||||||
} as unknown as Relations;
|
} as unknown as Relations;
|
||||||
mocked(relationsContainer.getRelations).mockReturnValue([
|
mocked(relationsContainer.getRelations).mockReturnValue([
|
||||||
mkVoiceBroadcastInfoEvent({
|
mkVoiceBroadcastInfoEvent({
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Stopped,
|
state: VoiceBroadcastInfoState.Stopped,
|
||||||
["m.relates_to"]: {
|
["m.relates_to"]: {
|
||||||
rel_type: RelationType.Reference,
|
rel_type: RelationType.Reference,
|
||||||
|
|
|
@ -89,6 +89,7 @@ describe("startNewVoiceBroadcastRecording", () => {
|
||||||
event: true,
|
event: true,
|
||||||
type: VoiceBroadcastInfoEventType,
|
type: VoiceBroadcastInfoEventType,
|
||||||
content: {
|
content: {
|
||||||
|
device_id: client.getDeviceId(),
|
||||||
state: VoiceBroadcastInfoState.Started,
|
state: VoiceBroadcastInfoState.Started,
|
||||||
},
|
},
|
||||||
user: client.getUserId(),
|
user: client.getUserId(),
|
||||||
|
|
Loading…
Reference in New Issue