Add Element Call room settings (#9347)
Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
@@ -46,6 +46,7 @@ import { findDMForUser } from "./utils/dm/findDMForUser";
|
||||
import { privateShouldBeEncrypted } from "./utils/rooms";
|
||||
import { waitForMember } from "./utils/membership";
|
||||
import { PreferredRoomVersions } from "./utils/PreferredRoomVersions";
|
||||
import SettingsStore from "./settings/SettingsStore";
|
||||
|
||||
// we define a number of interfaces which take their names from the js-sdk
|
||||
/* eslint-disable camelcase */
|
||||
@@ -168,6 +169,16 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
|
||||
},
|
||||
};
|
||||
}
|
||||
} else if (SettingsStore.getValue("feature_group_calls")) {
|
||||
createOpts.power_level_content_override = {
|
||||
events: {
|
||||
...DEFAULT_EVENT_POWER_LEVELS,
|
||||
// Element Call should be disabled by default
|
||||
[ElementCall.MEMBER_EVENT_TYPE.name]: 100,
|
||||
// Make sure only admins can enable it
|
||||
[ElementCall.CALL_EVENT_TYPE.name]: 100,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// By default, view the room after creating it
|
||||
|
||||
Reference in New Issue
Block a user