Hide snoozed reports in the queue as well
parent
84dabd437b
commit
46bc4ab365
|
@ -37,7 +37,7 @@ final class Report(
|
|||
api.maxScores zip env.streamer.api.approval.countRequests zip env.appeal.api.countUnread
|
||||
|
||||
private def renderList(me: Holder, room: String)(implicit ctx: Context) =
|
||||
api.openAndRecentWithFilter(12, Room(room)) zip
|
||||
api.openAndRecentWithFilter(asMod(me), 12, Room(room)) zip
|
||||
getScores flatMap { case (reports, scores ~ streamers ~ appeals) =>
|
||||
(env.user.lightUserApi preloadMany reports.flatMap(_.report.userIds)) inject
|
||||
Ok(
|
||||
|
|
|
@ -438,9 +438,9 @@ final class ReportApi(
|
|||
ReadPreference.secondaryPreferred
|
||||
) dmap (_ filterNot ReporterId.lichess.==)
|
||||
|
||||
def openAndRecentWithFilter(nb: Int, room: Option[Room]): Fu[List[Report.WithSuspect]] =
|
||||
def openAndRecentWithFilter(mod: Mod, nb: Int, room: Option[Room]): Fu[List[Report.WithSuspect]] =
|
||||
for {
|
||||
opens <- findBest(nb, selectOpenInRoom(room))
|
||||
opens <- findBest(nb, selectOpenAvailableInRoom(room, snoozer snoozedIdsOf mod))
|
||||
nbClosed = nb - opens.size
|
||||
closed <-
|
||||
if (room.has(Room.Xfiles) || nbClosed < 1) fuccess(Nil)
|
||||
|
|
Loading…
Reference in New Issue