mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
fix: remove rlement endpoints and links from the HealthChat
* fix(healthchat): switch off analytics, crash and bug reporting endpoints Upstream ships *.localhost placeholders in Secrets.swift and marks the file assume-unchanged; with analytics on, the Element Call widget was handed Element's own PostHog and Sentry. nil hides the analytics prompt, the Analytics and Report a problem entries until HealthChat runs its own services. * feat(healthchat): hide the Labs entry in settings * fix(healthchat): point Copyright and the analytics terms at healthchat.ch * docs(healthchat): add the 26.11.1 release notes * feat(healthchat): drop the Element help links * feat(healthchat): switch off location sharing * test(healthchat): skip the analytics suite without PostHog
This commit is contained in:
@@ -12,7 +12,8 @@ import Foundation
|
||||
/// - `accountProviders` / `allowOtherAccountProviders` lock every user to `healthchat.ch` (the server name;
|
||||
/// `.well-known` delegates to `matrix.healthchat.ch`) and hide the change-server / create-account UI.
|
||||
/// - `oAuthRedirectURL` uses the app's own URL scheme so the OIDC/MAS callback needs no associated domain.
|
||||
/// - Legacy `element.io` help/encryption/copyright URLs are passed through unchanged for now.
|
||||
/// - Legal links point at healthchat.ch. The encryption/verification/backup help links still go to
|
||||
/// Element's help pages because no HealthChat equivalents exist yet.
|
||||
struct HealthChatAppSettingsHook: AppSettingsHookProtocol {
|
||||
func configure(_ appSettings: AppSettings) -> AppSettings {
|
||||
appSettings.override(accountProviders: [.generic("healthchat.ch")],
|
||||
@@ -24,19 +25,25 @@ struct HealthChatAppSettingsHook: AppSettingsHookProtocol {
|
||||
oAuthClientURIPath: nil,
|
||||
websiteURL: "https://healthchat.ch",
|
||||
logoURL: "https://app.healthchat.ch/themes/element/img/logos/element-logo.png",
|
||||
copyrightURL: appSettings.copyrightURL,
|
||||
copyrightURL: "https://www.healthchat.ch/impressum",
|
||||
acceptableUseURL: "https://www.healthchat.ch/datenschutz",
|
||||
privacyURL: "https://www.healthchat.ch/datenschutz",
|
||||
encryptionURL: appSettings.encryptionURL,
|
||||
deviceVerificationURL: appSettings.deviceVerificationURL,
|
||||
chatBackupDetailsURL: appSettings.chatBackupDetailsURL,
|
||||
identityPinningViolationDetailsURL: appSettings.identityPinningViolationDetailsURL,
|
||||
historySharingDetailsURL: appSettings.historySharingDetailsURL,
|
||||
encryptionURL: nil,
|
||||
deviceVerificationURL: nil,
|
||||
chatBackupDetailsURL: nil,
|
||||
identityPinningViolationDetailsURL: nil,
|
||||
historySharingDetailsURL: nil,
|
||||
elementWebHosts: ["app.healthchat.ch"],
|
||||
accountProvisioningHost: appSettings.accountProvisioningHost,
|
||||
bugReportApplicationID: appSettings.bugReportApplicationID,
|
||||
analyticsTermsURL: appSettings.analyticsTermsURL,
|
||||
mapTilerConfiguration: AppSettings.bundledMapTilerConfiguration)
|
||||
bugReportApplicationID: "healthchat-ios",
|
||||
analyticsTermsURL: "https://www.healthchat.ch/datenschutz",
|
||||
mapTilerConfiguration: Self.mapTilerConfiguration)
|
||||
return appSettings
|
||||
}
|
||||
|
||||
/// No MapTiler account yet: a nil key hides location sharing and shows received locations as a placeholder.
|
||||
private static let mapTilerConfiguration = MapTilerConfiguration(baseURL: AppSettings.bundledMapTilerConfiguration.baseURL,
|
||||
apiKey: nil,
|
||||
lightStyleID: AppSettings.bundledMapTilerConfiguration.lightStyleID,
|
||||
darkStyleID: AppSettings.bundledMapTilerConfiguration.darkStyleID)
|
||||
}
|
||||
|
||||
@@ -28,5 +28,10 @@ final class HealthChatSettingsScreenHook: SettingsScreenHookProtocol {
|
||||
func refreshAccountStatus() {
|
||||
statusLoader.load()
|
||||
}
|
||||
|
||||
// Upstream's experiments are not supported by the HealthChat server setup and never reviewed for it.
|
||||
nonisolated var showsLabs: Bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,9 @@ nonisolated protocol SettingsScreenHookProtocol: Sendable {
|
||||
|
||||
/// Called whenever the settings screen appears, so the section reflects what the user just did.
|
||||
@MainActor func refreshAccountStatus()
|
||||
|
||||
/// Whether the Labs entry (experimental upstream features) is offered at all.
|
||||
var showsLabs: Bool { get }
|
||||
}
|
||||
|
||||
struct DefaultSettingsScreenHook: SettingsScreenHookProtocol {
|
||||
@@ -23,4 +26,8 @@ struct DefaultSettingsScreenHook: SettingsScreenHookProtocol {
|
||||
}
|
||||
|
||||
func refreshAccountStatus() { }
|
||||
|
||||
var showsLabs: Bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user