Type the crypto, settings, and component any sites. [skip build]
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
EventType,
|
||||
ICreateRoomOpts,
|
||||
ICreateRoomStateEvent,
|
||||
JoinRule,
|
||||
@@ -6,7 +7,7 @@ import {
|
||||
RestrictedAllowType,
|
||||
Room,
|
||||
} from 'matrix-js-sdk';
|
||||
import { RoomJoinRulesEventContent } from 'matrix-js-sdk/lib/types';
|
||||
import { RoomJoinRulesEventContent, SpaceChildEventContent } from 'matrix-js-sdk/lib/types';
|
||||
import { CreateRoomKind } from './CreateRoomKindSelector';
|
||||
import { RoomType, StateEvent } from '../../../types/matrix/room';
|
||||
import { getViaServers } from '../../plugins/via-servers';
|
||||
@@ -17,7 +18,7 @@ export const createRoomCreationContent = (
|
||||
allowFederation: boolean,
|
||||
additionalCreators: string[] | undefined,
|
||||
): object => {
|
||||
const content: Record<string, any> = {};
|
||||
const content: Record<string, unknown> = {};
|
||||
if (typeof type === 'string') {
|
||||
content.type = type;
|
||||
}
|
||||
@@ -144,12 +145,12 @@ export const createRoom = async (mx: MatrixClient, data: CreateRoomData): Promis
|
||||
if (data.parent) {
|
||||
await mx.sendStateEvent(
|
||||
data.parent.roomId,
|
||||
StateEvent.SpaceChild as any,
|
||||
EventType.SpaceChild,
|
||||
{
|
||||
auto_join: false,
|
||||
suggested: false,
|
||||
via: [getMxIdServer(mx.getUserId() ?? '') ?? ''],
|
||||
},
|
||||
} as SpaceChildEventContent,
|
||||
result.room_id,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user