Add profile world type

This commit is contained in:
Ajay Bura 2022-06-06 13:04:48 +05:30
parent 46230e59ad
commit dc1f0fecb5
2 changed files with 6 additions and 4 deletions

View file

@ -151,9 +151,10 @@ export class RoomBeingCreated extends EventEmitter<{change: never}> {
createOptions.room_alias_name = this.options.alias; createOptions.room_alias_name = this.options.alias;
} }
if (this.options.type !== undefined) { if (this.options.type !== undefined) {
createOptions.creation_content = { let type: string | undefined = undefined;
type: this.options.type === RoomType.World ? "org.matrix.msc3815.world" : undefined, if (this.options.type === RoomType.World) type = "org.matrix.msc3815.world";
}; if (this.options.type === RoomType.Profile) type = "org.matrix.msc3815.profile";
createOptions.creation_content = { type };
} }
if (this.options.isFederationDisabled === true) { if (this.options.isFederationDisabled === true) {
if (createOptions.creation_content === undefined) createOptions.creation_content = {}; if (createOptions.creation_content === undefined) createOptions.creation_content = {};

View file

@ -48,7 +48,8 @@ export enum RoomVisibility {
} }
export enum RoomType { export enum RoomType {
World World,
Profile,
} }
type RoomResponse = { type RoomResponse = {