1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Improve some voice broadcast tests (#9786)

This commit is contained in:
Michael Weimann
2022-12-16 19:23:29 +01:00
committed by GitHub
parent 6ec6d44c96
commit 9584388171
4 changed files with 75 additions and 83 deletions

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { EventType, MatrixEvent, MsgType } from "matrix-js-sdk/src/matrix";
import { EventType, MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix";
import {
VoiceBroadcastChunkEventType,
@ -54,6 +54,7 @@ export const mkVoiceBroadcastInfoStateEvent = (
};
export const mkVoiceBroadcastChunkEvent = (
infoEventId: string,
userId: string,
roomId: string,
duration: number,
@ -76,6 +77,10 @@ export const mkVoiceBroadcastChunkEvent = (
[VoiceBroadcastChunkEventType]: {
...(sequence ? { sequence } : {}),
},
["m.relates_to"]: {
rel_type: RelationType.Reference,
event_id: infoEventId,
},
},
ts: timestamp,
});