Use EventType at the space create sites and augment the room kind key. [skip build]
Checks / checks (push) Successful in 2m5s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-02 05:24:52 +11:00
parent fea879497c
commit 3db9b499af
2 changed files with 5 additions and 9 deletions
@@ -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
+1
View File
@@ -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 {