Add the initial implementation for managing spaces. (#4963)

This isn't hooked up into the flows yet.
This commit is contained in:
Doug
2026-01-16 15:29:27 +00:00
committed by GitHub
parent a861c15d96
commit 6a75d80081
33 changed files with 529 additions and 65 deletions
@@ -76,6 +76,15 @@ class SpaceServiceProxy: SpaceServiceProxyProtocol {
}
}
func removeChild(_ childID: String, from spaceID: String) async -> Result<Void, SpaceServiceProxyError> {
do {
return try await .success(spaceService.removeChildFromSpace(childId: childID, spaceId: spaceID))
} catch {
MXLog.error("Failed to remove child \(childID) to space \(spaceID)")
return .failure(.sdkError(error))
}
}
// MARK: - Private
private func handleUpdates(_ updates: [SpaceListUpdate]) {
@@ -26,4 +26,5 @@ protocol SpaceServiceProxyProtocol {
/// Adds a room (or space) as a child of another space.
func addChild(_ childID: String, to spaceID: String) async -> Result<Void, SpaceServiceProxyError>
func removeChild(_ childID: String, from spaceID: String) async -> Result<Void, SpaceServiceProxyError>
}