From 03d152675ee1ce208856498acf7285fbf07fd45b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 9 Aug 2023 17:34:16 -0700 Subject: Add self-labeling controls (#1141) * Add self-label modal * Use the shield-exclamation icon consistently on post moderation * Wire up self-labeling * Bump @atproto/api@0.6.0 * Bump @atproto/dev-env@^0.2.3 * Add e2e test for self-labeling * Fix types --- src/lib/moderation.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/moderation.ts') diff --git a/src/lib/moderation.ts b/src/lib/moderation.ts index 1ed830fd8..70c4444fe 100644 --- a/src/lib/moderation.ts +++ b/src/lib/moderation.ts @@ -29,12 +29,7 @@ export function describeModerationCause( } } if (cause.type === 'muted') { - if (cause.source.type === 'user') { - return { - name: context === 'account' ? 'Muted User' : 'Post by muted user', - description: 'You have muted this user', - } - } else { + if (cause.source.type === 'list') { return { name: context === 'account' @@ -42,6 +37,11 @@ export function describeModerationCause( : `Post by muted user ("${cause.source.list.name}")`, description: 'You have muted this user', } + } else { + return { + name: context === 'account' ? 'Muted User' : 'Post by muted user', + description: 'You have muted this user', + } } } return cause.labelDef.strings[context].en -- cgit 1.4.1