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