remove map tiler url from matrix wellknown

This commit is contained in:
Mauro Romito
2026-08-04 13:42:51 +02:00
committed by Mauro
parent 80530f0006
commit 748ec818ac
22 changed files with 120 additions and 280 deletions
@@ -259,7 +259,6 @@ class AuthenticationService: AuthenticationServiceProtocol {
appSettings: appSettings,
appHooks: appHooks)
try await appHooks.remoteSettingsHook.initializeCache(using: client, applyingTo: appSettings).get()
await client.updateMapTilerSettings(in: appSettings)
return client
}
@@ -29,18 +29,4 @@ nonisolated extension ClientProtocol {
return .failure(.sdkError(error))
}
}
/// Reads the homeserver-advertised map tile server (`tile_server.map_style_url`
/// from the matrix client well-known) and applies it to ``AppSettings``.
///
/// Clears any previously applied URL when none is advertised (or the well-known
/// is unavailable), so each session start reflects the latest server-side
/// configuration.
func updateMapTilerSettings(in appSettings: AppSettings) async {
if let url = await tileServer().flatMap({ URL(string: $0.mapStyleUrl) }) {
appSettings.mapTilerSettings.applyRemoteValue(.url(url))
} else {
appSettings.mapTilerSettings.reset()
}
}
}
@@ -152,7 +152,6 @@ class UserSessionStore: UserSessionStoreProtocol {
MXLog.info("Set up session for user \(credentials.userID) at: \(credentials.restorationToken.sessionDirectories)")
Task(priority: .low) { await appHooks.remoteSettingsHook.updateCache(using: client) }
Task(priority: .low) { await client.updateMapTilerSettings(in: appSettings) }
return try await .success(setupProxyForClient(client))
} catch UserSessionStoreError.failedSettingUpClientProxy(let error) {