damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 3ddb2625e9d94a83f954e6d66c8e66d447cf520c
parent f53ffae767cab96ea184aa07eba2add5710024ec
Author: Terry Yiu <git@tyiu.xyz>
Date:   Wed,  9 Jul 2025 19:55:13 -0400

Fix #nsfw tag filtering to be case insensitive

Closes: https://github.com/damus-io/damus/issues/3131

Changelog-Fixed: Fixed #nsfw tag filtering to be case insensitive
Signed-off-by: Terry Yiu <git@tyiu.xyz>

Diffstat:
Mdamus/Models/ContentFilters.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Models/ContentFilters.swift b/damus/Models/ContentFilters.swift @@ -31,7 +31,7 @@ enum FilterState : Int { /// Simple filter to determine whether to show posts with #nsfw tags func nsfw_tag_filter(ev: NostrEvent) -> Bool { - return ev.referenced_hashtags.first(where: { t in t.hashtag == "nsfw" }) == nil + return ev.referenced_hashtags.first(where: { t in t.hashtag.caseInsensitiveCompare("nsfw") == .orderedSame }) == nil } func get_repost_of_muted_user_filter(damus_state: DamusState) -> ((_ ev: NostrEvent) -> Bool) {