Skip to content

Commit

Permalink
show mod messages in mod timeline outside of the comm angle
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 21, 2024
1 parent c399314 commit 390ee2f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions modules/api/src/main/ModTimeline.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ case class ModTimeline(
// latest first
concat.sorted(using Ordering.by(at).reverse)

// def commReportsAbout: List[Report] = reports
// .collect:
// case Report.AndAtom(r, _) if r.is(_.Comm) => r
// .distinct

object ModTimeline:

case class ReportNewAtom(report: Report, atoms: NonEmptyList[Report.Atom])
Expand Down Expand Up @@ -114,9 +109,9 @@ object ModTimeline:
case _: ReportClose => angle != Angle.Comm
case l: Modlog if l.action == Modlog.chatTimeout && angle != Angle.Comm => false
case l: Modlog if l.action == Modlog.modMessage =>
if l.details.has(lila.playban.PlaybanFeedback.sittingAutoPreset.name)
then angle != Comm
else angle == Comm
angle match
case Comm => !l.details.has(lila.playban.PlaybanFeedback.sittingAutoPreset.name)
case _ => true
case _ => true

final class ModTimelineApi(
Expand Down

0 comments on commit 390ee2f

Please sign in to comment.