mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 20:14:53 +01:00
Add power_level_content_override to create room
This commit is contained in:
parent
468a0a9698
commit
85b77e277f
@ -38,6 +38,7 @@ type CreateRoomPayload = {
|
||||
room_alias_name?: string;
|
||||
creation_content?: {"m.federate": boolean};
|
||||
initial_state: {type: string; state_key: string; content: Record<string, any>}[]
|
||||
power_level_content_override?: any;
|
||||
}
|
||||
|
||||
type ImageInfo = {
|
||||
@ -62,6 +63,7 @@ type Options = {
|
||||
invites?: string[];
|
||||
avatar?: Avatar;
|
||||
alias?: string;
|
||||
powerLevelContentOverride?: any;
|
||||
}
|
||||
|
||||
function defaultE2EEStatusForType(type: RoomType): boolean {
|
||||
@ -161,6 +163,9 @@ export class RoomBeingCreated extends EventEmitter<{change: never}> {
|
||||
content: avatarEventContent
|
||||
});
|
||||
}
|
||||
if (this.options.powerLevelContentOverride) {
|
||||
createOptions.power_level_content_override = this.options.powerLevelContentOverride;
|
||||
}
|
||||
const response = await hsApi.createRoom(createOptions, {log}).response();
|
||||
this._roomId = response["room_id"];
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user