Public chat page: fix swiss timeout

pull/9923/head
kraktus 2021-10-03 13:36:32 +02:00
parent 5af50b8b8d
commit 1d6fc99b03
2 changed files with 6 additions and 2 deletions

View File

@ -161,7 +161,11 @@ final class ChatApi(
reason = reason,
scope = ChatTimeout.Scope.Global,
text = data.text,
busChan = if (data.chan == "tournament") _.Tournament else _.Simul
busChan = data.chan match {
case "tournament" => _.Tournament
case "swiss" => _.Swiss
case _ => _.Simul
}
)
}

View File

@ -100,7 +100,7 @@ object ChatTimeout {
val form = Form(
mapping(
"roomId" -> nonEmptyText,
"chan" -> lila.common.Form.stringIn(Set("tournament", "simul")),
"chan" -> lila.common.Form.stringIn(Set("tournament", "simul", "swiss")),
"userId" -> nonEmptyText,
"reason" -> nonEmptyText,
"text" -> nonEmptyText