-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Allow muting reporter #95
Conversation
Your Render PR Server URL is https://ozone-staging-pr-95.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-coe5q54f7o1s73ck4sj0. |
Your Render PR Server URL is https://ozone-sandbox-pr-95.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-coe5q5sf7o1s73ck4so0. |
const isCommentEvent = modEventType === MOD_EVENTS.COMMENT | ||
const shouldShowDurationInHoursField = | ||
modEventType === MOD_EVENTS.TAKEDOWN || isMuteEvent | ||
const isReportingMutedForSubject = isMuted(subjectStatus, true) | ||
const shouldShowMuteReportingOnlyField = | ||
isSubjetDid && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the work in this PR, but I noticed a typo in this variable name: isSubjetDid
vs. isSubjectDid
.
@@ -126,6 +127,12 @@ const ResolvedFilters = () => { | |||
onClick: () => updateParams('includeMuted', true), | |||
isActive: includeMuted === 'true', | |||
}, | |||
{ | |||
id: 'onlyMuted', | |||
text: 'Only Muted', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What results should you get when "only muted" is on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only subjects that were muted or reporters that were muted will show up in the queue. This is to provide a quick way to glance through all mutes in case manual reverse/check is necessary.
<ReasonBadge reasonType={modEvent.event.reportType} /> | ||
)} | ||
</p> | ||
<div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the build issue is on this line 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh, maybe Card
's prop types need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you point at the right line? not seeing any issues here? maybe got cleaned up along the way?
components/subject/helpers.ts
Outdated
const field = reportingOnly ? 'muteReportingUntil' : 'muteUntil' | ||
if (!subjectStatus?.[field]) return false | ||
return new Date(`${subjectStatus[field]}`) > new Date() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types might get loosened here if field
gets typed as string
. Could always do something like this if it helps:
const field = reportingOnly ? 'muteReportingUntil' : 'muteUntil' | |
if (!subjectStatus?.[field]) return false | |
return new Date(`${subjectStatus[field]}`) > new Date() | |
if (!subjectStatus) return false | |
const until = reportingOnly ? subjectStatus.muteReportingUntil : subjectStatus.muteUntil | |
return new Date(until) > new Date() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be a few build issues unrelated to @atproto/api typings—aside from that, this is looking good to go! 👍
Depends on bluesky-social/atproto#2390
This PR allows moderators to mute reports from a user. It also adds various indicators in the UI around reporter muting such as
It also adds a way for moderators to view ONLY subjects or reporters that have been muted.