Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

feat: support child tags in NSFW blur feature (#4640)

João Tiagoa46301fa7753
diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx
index 689b17c32..6118c7105 100644
--- a/web/src/components/MemoView.tsx
+++ b/web/src/components/MemoView.tsx
@@ -60,7 +60,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
const parentPage = props.parentPage || location.pathname;
const nsfw =
workspaceMemoRelatedSetting.enableBlurNsfwContent &&
- memo.tags?.some((tag) => workspaceMemoRelatedSetting.nsfwTags.includes(tag.toLowerCase()));
+ memo.tags?.some((tag) => workspaceMemoRelatedSetting.nsfwTags.some((nsfwTag) => tag === nsfwTag || tag.startsWith(`${nsfwTag}/`)));
// Initial related data: creator.
useAsyncEffect(async () => {