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
flagged accounts should not appear on TV #14858
Comments
ok, maybe it's difficult to disclose |
Even if it is against the computer, isn't featuring flagged accounts on TV condoning their behavior to some extent? Also, the example shown is a computer match, but the issue concerns all the TV sections. It is highly unlikely, but the TV could feature a top player who was just found to violate ToS. |
Jotting down a "simple" solution which works on my empty test system (tested with bots),
...
lightUserSync: lila.core.LightUser.GetterSync,
+ userApi: lila.core.user.UserApi,
...
...
lightUserApi: lila.core.user.LightUserApi,
+ userApi: lila.core.user.UserApi,
...
case lila.core.game.StartGame(g) =>
if g.hasClock then
+ userApi
+ .countEngines(g.userIds)
+ .map(nb =>
+ if nb == 0 then
val candidate = Tv.Candidate(g, g.userIds.exists(lightUserApi.isBotSync))
channelActors
.collect {
case (chan, actor) if chan.filter(candidate) => actor
}
.foreach(_.addCandidate(g))
+ )
... |
Are we sure we want flagged accounts featured on TV?
The text was updated successfully, but these errors were encountered: