Skip to content

Commit

Permalink
chore: remove old finalize moderation
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Mar 28, 2024
1 parent ca115ca commit 5a387eb
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions app/api/moderation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,32 +587,6 @@ const sortByPriority = (a: ModerationCause, b: ModerationCause) => {
return a.p - b.p;
};

// export const finalizeModeration = (accu: ModerationCause[]): ModerationDecision | null => {
// accu.sort((a, b) => a.p - b.p);

// if (accu.length > 0) {
// const cause = accu.sort((a, b) => a.p - b.p)[0];

// // Other moderation cause types should result in a blur only.
// const isLabelCause = cause.t === CauseLabel;

// const blur = isLabelCause ? cause.d.b : BlurAll;
// const sev = isLabelCause ? cause.d.s : SeverityNone;

// return {
// s: cause,

// f: (isLabelCause || cause.t === CauseMutedKeyword) && cause.v === PreferenceHide,
// a: sev === SeverityAlert,
// i: sev === SeverityInform,
// b: blur === BlurAll,
// m: blur === BlurMedia,
// };
// }

// return null;
// };

export const isProfileTempMuted = (prefs: ModerationOptions, actor: At.DID): number | null => {
const date = prefs.tempMutes[actor];
return date !== undefined && Date.now() < date ? date : null;
Expand Down

0 comments on commit 5a387eb

Please sign in to comment.