The author of the original post blocked the author.{' '}
-
+
See quoted post
{' ยท '}
@@ -415,10 +419,11 @@ function PostLabels({
{labels?.map((label, i) => {
const { val, src } = label
const labelGroup = getLabelGroupInfo(val)
-
return (
{
return (
-
+
By{' '}
@@ -45,7 +46,7 @@ const Comment = ({
header="Removed: "
labels={modEvent.event.negateLabelVals as string[] | undefined}
/>
-
+
)
}
@@ -57,7 +58,7 @@ const Email = ({
}
}) => {
return (
-
+
By{' '}
{modEvent.creatorHandle
@@ -68,7 +69,7 @@ const Email = ({
Subject: {modEvent.event.subjectLine}
)}
{modEvent.event.comment && {modEvent.event.comment}
}
-
+
)
}
@@ -82,7 +83,7 @@ const Report = ({
const isAppeal =
modEvent.event.reportType === ComAtprotoModerationDefs.REASONAPPEAL
return (
-
+
By{' '}
@@ -97,7 +98,7 @@ const Report = ({
{modEvent.event.comment && (
{modEvent.event.comment}
)}
-
+
)
}
@@ -112,7 +113,7 @@ const TakedownOrMute = ({
}) => {
const expiresAt = getExpiresAtFromEvent(modEvent)
return (
-
+
By{' '}
@@ -141,7 +142,7 @@ const TakedownOrMute = ({
header="Removed: "
labels={modEvent.event.negateLabelVals as string[] | undefined}
/>
-
+
)
}
@@ -176,7 +177,7 @@ const Label = ({
} & ComAtprotoAdminDefs.ModEventView
}) => {
return (
-
+
By{' '}
@@ -190,7 +191,7 @@ const Label = ({
) : null}
-
+
)
}
@@ -202,7 +203,7 @@ const Tag = ({
} & ComAtprotoAdminDefs.ModEventView
}) => {
return (
-
+
By{' '}
@@ -216,7 +217,7 @@ const Tag = ({
) : null}
-
+
)
}
@@ -250,7 +251,9 @@ export const ModEventItem = ({
ComAtprotoAdminDefs.isModEventComment(modEvent.event) ||
ComAtprotoAdminDefs.isModEventUnmute(modEvent.event) ||
ComAtprotoAdminDefs.isModEventResolveAppeal(modEvent.event) ||
- ComAtprotoAdminDefs.isModEventReverseTakedown(modEvent.event)
+ ComAtprotoAdminDefs.isModEventReverseTakedown(modEvent.event) ||
+ // This is temporary since the api package with this new type check is not yet published
+ modEvent.event.$type === 'com.atproto.admin.defs#modEventDivert'
) {
eventItem =
}
diff --git a/components/mod-event/SelectorButton.tsx b/components/mod-event/SelectorButton.tsx
index 6f696d46..42387a76 100644
--- a/components/mod-event/SelectorButton.tsx
+++ b/components/mod-event/SelectorButton.tsx
@@ -28,6 +28,10 @@ const actions = [
text: 'Resolve Appeal',
key: MOD_EVENTS.RESOLVE_APPEAL,
},
+ {
+ text: 'Divert',
+ key: MOD_EVENTS.DIVERT,
+ },
]
const actionsByKey = actions.reduce((acc, action) => {
acc[action.key] = action.text
@@ -38,10 +42,12 @@ export const ModEventSelectorButton = ({
subjectStatus,
selectedAction,
setSelectedAction,
+ hasBlobs,
}: {
subjectStatus?: ComAtprotoAdminDefs.SubjectStatusView | null
selectedAction: string
setSelectedAction: (action: string) => void
+ hasBlobs: boolean
}) => {
const availableActions = useMemo(() => {
return actions.filter(({ key, text }) => {
@@ -58,7 +64,14 @@ export const ModEventSelectorButton = ({
return false
}
// Don't show takedown action if subject is already takendown
- if (key === MOD_EVENTS.TAKEDOWN && subjectStatus?.takendown) {
+ if (
+ (key === MOD_EVENTS.TAKEDOWN || key === MOD_EVENTS.DIVERT) &&
+ subjectStatus?.takendown
+ ) {
+ return false
+ }
+ // Don't show divert action if the subject does not have any blobs
+ if (key === MOD_EVENTS.DIVERT && !hasBlobs) {
return false
}
// Don't show reverse takedown action if subject is not takendown
@@ -88,6 +101,7 @@ export const ModEventSelectorButton = ({
subjectStatus?.muteUntil,
subjectStatus?.reviewState,
subjectStatus?.appealed,
+ hasBlobs,
])
return (
{
+ if (ActionErrors[error]) {
+ return (
+
+ {ActionErrors[error].title}
+ {ActionErrors[error].description}
+
+ )
+ }
+ return (
+
+ {error}
+
+ )
+}