From cb694d537fa52ab6d6886b77005641c047152728 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 11 Dec 2023 16:51:42 +0100 Subject: [PATCH] code cleanup --- .../push/impl/notifications/NotifiableEventResolver.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt index 4a1020ce1a..017627305e 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt @@ -269,10 +269,12 @@ class NotifiableEventResolver @Inject constructor( return fileResult .onFailure { Timber.tag(loggerTag.value).e(it, "Failed to download image for notification") - }.getOrNull()?.let { mediaFile -> + } + .map { mediaFile -> val authority = "${context.packageName}.notifications.fileprovider" FileProvider.getUriForFile(context, authority, mediaFile) } + .getOrNull() } }