mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Always create a slot on a new room.
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
|||||||
MemoryStore,
|
MemoryStore,
|
||||||
Preset,
|
Preset,
|
||||||
Visibility,
|
Visibility,
|
||||||
|
EventType,
|
||||||
} from "matrix-js-sdk";
|
} from "matrix-js-sdk";
|
||||||
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
|
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
|
||||||
import { logger } from "matrix-js-sdk/lib/logger";
|
import { logger } from "matrix-js-sdk/lib/logger";
|
||||||
@@ -28,6 +29,10 @@ import {
|
|||||||
type EncryptionSystem,
|
type EncryptionSystem,
|
||||||
saveKeyForRoom,
|
saveKeyForRoom,
|
||||||
} from "../e2ee/sharedKeyManagement";
|
} from "../e2ee/sharedKeyManagement";
|
||||||
|
import {
|
||||||
|
DefaultCallApplicationSlot,
|
||||||
|
RtcSlotEventContent,
|
||||||
|
} from "matrix-js-sdk/lib/matrixrtc";
|
||||||
|
|
||||||
export const fallbackICEServerAllowed =
|
export const fallbackICEServerAllowed =
|
||||||
import.meta.env.VITE_FALLBACK_STUN_ALLOWED === "true";
|
import.meta.env.VITE_FALLBACK_STUN_ALLOWED === "true";
|
||||||
@@ -236,6 +241,15 @@ export async function createRoom(
|
|||||||
preset: Preset.PublicChat,
|
preset: Preset.PublicChat,
|
||||||
name,
|
name,
|
||||||
room_alias_name: e2ee ? undefined : roomAliasLocalpartFromRoomName(name),
|
room_alias_name: e2ee ? undefined : roomAliasLocalpartFromRoomName(name),
|
||||||
|
initial_state: [
|
||||||
|
// Always create a slot
|
||||||
|
{
|
||||||
|
type: EventType.RTCSlot,
|
||||||
|
content: {
|
||||||
|
application: { ...DefaultCallApplicationSlot.application },
|
||||||
|
} satisfies RtcSlotEventContent,
|
||||||
|
},
|
||||||
|
],
|
||||||
power_level_content_override: {
|
power_level_content_override: {
|
||||||
invite: 100,
|
invite: 100,
|
||||||
kick: 100,
|
kick: 100,
|
||||||
|
|||||||
Reference in New Issue
Block a user