hidden shit, and online status bars, search settings
This commit is contained in:
@@ -181,10 +181,8 @@ export function isValidChild(mEvent: MatrixEvent): boolean {
|
||||
if (mEvent.getType() !== StateEvent.SpaceChild) return false;
|
||||
const stateKey = mEvent.getStateKey();
|
||||
if (!stateKey || !stateKey.startsWith('!')) return false;
|
||||
const { via } = mEvent.getContent<{ via?: string[] }>();
|
||||
// via is optional on m.space.child; only reject malformed values
|
||||
if (via !== undefined && !Array.isArray(via)) return false;
|
||||
return true;
|
||||
// via is required; omitting it (e.g. empty {}) removes the child per Matrix spec
|
||||
return Array.isArray(mEvent.getContent<{ via?: string[] }>().via);
|
||||
}
|
||||
|
||||
export const getAllParents = (roomToParents: RoomToParents, roomId: string): Set<string> => {
|
||||
|
||||
Reference in New Issue
Block a user