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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
});