1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Consider own broadcasts from other device as a playback (#9821)

This commit is contained in:
Michael Weimann
2022-12-23 17:41:18 +01:00
committed by GitHub
parent 32140855fb
commit 6c40e2476a
3 changed files with 49 additions and 29 deletions

View File

@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { Optional } from "matrix-events-sdk";
import { EventType, MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix";
import {
@@ -24,10 +25,10 @@ import {
import { mkEvent } from "../../test-utils";
export const mkVoiceBroadcastInfoStateEvent = (
roomId: string,
state: VoiceBroadcastInfoState,
senderId: string,
senderDeviceId: string,
roomId: Optional<string>,
state: Optional<VoiceBroadcastInfoState>,
senderId: Optional<string>,
senderDeviceId: Optional<string>,
startedInfoEvent?: MatrixEvent,
): MatrixEvent => {
const relationContent = {};
@@ -41,9 +42,12 @@ export const mkVoiceBroadcastInfoStateEvent = (
return mkEvent({
event: true,
// @ts-ignore allow everything here for edge test cases
room: roomId,
// @ts-ignore allow everything here for edge test cases
user: senderId,
type: VoiceBroadcastInfoEventType,
// @ts-ignore allow everything here for edge test cases
skey: senderId,
content: {
state,