Improve some voice broadcast tests (#9786)

This commit is contained in:
Michael Weimann
2022-12-16 18:23:29 +00:00
committed by GitHub
parent 6ec6d44c96
commit 9584388171
4 changed files with 75 additions and 83 deletions
+6 -1
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,
});