don't self-report anon in slack
parent
9c37c10245
commit
60d5bcc820
|
@ -25,12 +25,14 @@ final class SelfReport(
|
|||
lila.log("cheat").branch("jslog").info(
|
||||
s"$ip https://lichess.org/$fullId ${user.fold("anon")(_.id)} $name"
|
||||
)
|
||||
slackApi.selfReport(
|
||||
typ = name,
|
||||
path = fullId,
|
||||
user = user,
|
||||
ip = ip
|
||||
)
|
||||
user ?? { u =>
|
||||
slackApi.selfReport(
|
||||
typ = name,
|
||||
path = fullId,
|
||||
user = u,
|
||||
ip = ip
|
||||
)
|
||||
}
|
||||
}
|
||||
if (fullId == "________") fuccess(doLog)
|
||||
else lila.game.GameRepo pov fullId map {
|
||||
|
|
|
@ -92,10 +92,10 @@ final class SlackApi(
|
|||
channel = rooms.tavernBots
|
||||
))
|
||||
|
||||
def selfReport(typ: String, path: String, user: Option[User], ip: IpAddress): Funit = client(SlackMessage(
|
||||
def selfReport(typ: String, path: String, user: User, ip: IpAddress): Funit = client(SlackMessage(
|
||||
username = "Self Report",
|
||||
icon = "kms",
|
||||
text = s"[*$typ*] ${user.fold("Anon")(userLink)}@$ip ${gameLink(path)}",
|
||||
text = s"[*$typ*] ${userLink(user)}@$ip ${gameLink(path)}",
|
||||
channel = rooms.tavernBots
|
||||
))
|
||||
|
||||
|
|
Loading…
Reference in New Issue