Skip to content

Commit

Permalink
Filter needs-review labels (bluesky-social#3076)
Browse files Browse the repository at this point in the history
filter needs review labels
  • Loading branch information
dholms authored Nov 22, 2024
1 parent 011e73e commit 0dff612
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/bsky/src/hydration/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,24 @@ export class LabelHydrator {
}
acc.set(label.uri, entry)
}
entry.labels.set(Labels.key(label), label)
if (
TAKEDOWN_LABELS.includes(label.val) &&
const isActionableNeedsReview =
label.val === NEEDS_REVIEW_LABEL &&
!label.neg &&
labelers.redact.has(label.src)
) {
entry.isTakendown = true

// we action needs review labels on backend for now so don't send to client until client has proper logic for them
if (!isActionableNeedsReview) {
entry.labels.set(Labels.key(label), label)
}

if (
label.val === NEEDS_REVIEW_LABEL &&
TAKEDOWN_LABELS.includes(label.val) &&
!label.neg &&
labelers.redact.has(label.src)
) {
entry.isTakendown = true
}
if (isActionableNeedsReview) {
entry.needsReview = true
}
return acc
Expand Down

0 comments on commit 0dff612

Please sign in to comment.