Merge pull request #6035 from element-hq/fix/remove-fragment-part-in-mxc-urls

Add `MediaSource.safeUrl` for removing invalid fragment part from URLs
This commit is contained in:
Benoit Marty 2026-03-03 11:57:49 +01:00 committed by GitHub
commit b65b9eeab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 53 additions and 15 deletions

View file

@ -30,5 +30,5 @@ data class TimelineItemStickerContent(
/* Stickers are supposed to be small images so
we allow using the mediaSource (unless the url is empty) */
val preferredMediaSource = if (mediaSource.url.isEmpty()) thumbnailSource else mediaSource
val preferredMediaSource = if (mediaSource.safeUrl.isEmpty()) thumbnailSource else mediaSource
}