Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db9b499af |
@@ -56,7 +56,7 @@ function CreateRoomModal({ state }: CreateRoomModalProps) {
|
||||
// Set m.space.parent on the new room pointing to parent
|
||||
await mx.sendStateEvent(
|
||||
newRoomId,
|
||||
StateEvent.SpaceParent,
|
||||
EventType.SpaceParent,
|
||||
{
|
||||
canonical: true,
|
||||
via: viaServers,
|
||||
@@ -67,7 +67,7 @@ function CreateRoomModal({ state }: CreateRoomModalProps) {
|
||||
// Set m.space.child on the parent room pointing to this sub-room
|
||||
await mx.sendStateEvent(
|
||||
parentSubRoomId,
|
||||
StateEvent.SpaceChild,
|
||||
EventType.SpaceChild,
|
||||
{ via: viaServers },
|
||||
newRoomId,
|
||||
);
|
||||
@@ -79,7 +79,7 @@ function CreateRoomModal({ state }: CreateRoomModalProps) {
|
||||
);
|
||||
if (parentJoinRulesEvent) {
|
||||
const joinRulesContent = parentJoinRulesEvent.getContent();
|
||||
await mx.sendStateEvent(newRoomId, StateEvent.RoomJoinRules, joinRulesContent, '');
|
||||
await mx.sendStateEvent(newRoomId, EventType.RoomJoinRules, joinRulesContent, '');
|
||||
}
|
||||
|
||||
// Add new room to parent's sub-rooms list
|
||||
@@ -89,12 +89,7 @@ function CreateRoomModal({ state }: CreateRoomModalProps) {
|
||||
const newContent: PaarrotSubRoomsContent = {
|
||||
children: [...currentChildren, newRoomId],
|
||||
};
|
||||
await mx.sendStateEvent(
|
||||
parentSubRoomId,
|
||||
StateEvent.PaarrotSubRooms as any,
|
||||
newContent,
|
||||
'',
|
||||
);
|
||||
await mx.sendStateEvent(parentSubRoomId, StateEvent.PaarrotSubRooms, newContent, '');
|
||||
|
||||
// Also add sub-room to parent's space(s) for joining/permissions
|
||||
// The UI will hide it from the top-level display and only show it nested
|
||||
|
||||
@@ -232,6 +232,7 @@ declare module 'matrix-js-sdk' {
|
||||
[StateEvent.PowerLevelTags]: Record<number, MemberPowerTag>;
|
||||
[StateEvent.PoniesRoomEmotes]: PackContent;
|
||||
[StateEvent.PaarrotSubRooms]: PaarrotSubRoomsContent;
|
||||
[StateEvent.PaarrotRoomKind]: { kind?: string };
|
||||
}
|
||||
|
||||
interface TimelineEvents {
|
||||
|
||||
Reference in New Issue
Block a user