From aba758b143f66da1caf306cde720a82760cd355d Mon Sep 17 00:00:00 2001 From: Ben Weeks Date: Fri, 6 Jan 2023 00:39:57 +0000 Subject: [PATCH] Fixes damus-io/damus#246 ChangeLog-Changed: Resolved issue with image URLs in uppercase (@npub1jutptdc2m8kgjmudtws095qk2tcale0eemvp4j2xnjnl4nh6669slrf04x) --- damus/Views/NoteContentView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift index e1038077..81b12467 100644 --- a/damus/Views/NoteContentView.swift +++ b/damus/Views/NoteContentView.swift @@ -54,7 +54,7 @@ func render_note_content(ev: NostrEvent, profiles: Profiles, privkey: String?) - func is_image_url(_ url: URL) -> Bool { let str = url.lastPathComponent - return str.hasSuffix("png") || str.hasSuffix("jpg") || str.hasSuffix("jpeg") || str.hasSuffix("gif") + return str.lowercased().hasSuffix("png") || str.lowercased().hasSuffix("jpg") || str.lowercased().hasSuffix("jpeg") || str.lowercased().hasSuffix("gif") } struct NoteContentView: View {