From ae71a92ab7f45c01c55df85e76b6662cca9c70f3 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Thu, 23 Jul 2026 13:04:51 +0200 Subject: [PATCH] add content scanner to the NSE Client --- NSE/Sources/NSEUserSession.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NSE/Sources/NSEUserSession.swift b/NSE/Sources/NSEUserSession.swift index 5c2ecbaa0..dc5e74255 100644 --- a/NSE/Sources/NSEUserSession.swift +++ b/NSE/Sources/NSEUserSession.swift @@ -90,6 +90,12 @@ final nonisolated class NSEUserSession: NSEUserSessionProtocol { try await baseClient.restoreSessionWith(session: credentials.restorationToken.session, roomLoadSettings: .one(roomId: roomID)) + // Inject the content scanner so the SDK gates the media it downloads whilst building the notification. + if let contentScannerURL = appSettings.contentScannerURL.publisher.value { + let contentScanner = ContentScanner(scannerUrl: contentScannerURL.absoluteString) + await baseClient.setContentScanner(contentScanner: contentScanner) + } + notificationClient = try await baseClient.notificationClient(processSetup: .multipleProcesses) }