let tournament owner join the chat - closes #6553
This commit is contained in:
parent
8fb165bea0
commit
3f0d187f2a
|
@ -73,7 +73,7 @@ final class Tournament(
|
|||
private[controllers] def canHaveChat(tour: Tour, json: Option[JsObject])(implicit ctx: Context): Boolean =
|
||||
tour.hasChat && !ctx.kid && // no public chats for kids
|
||||
ctx.me.fold(!tour.isPrivate) { u => // anon can see public chats, except for private tournaments
|
||||
(!tour.isPrivate || json.fold(true)(jsonHasMe) || isGranted(
|
||||
(!tour.isPrivate || json.fold(true)(jsonHasMe) || ctx.userId.has(tour.createdBy) || isGranted(
|
||||
_.ChatTimeout
|
||||
)) && // private tournament that I joined or has ChatTimeout
|
||||
env.chat.panic.allowed(u, tighter = tour.variant == chess.variant.Antichess)
|
||||
|
|
Loading…
Reference in a new issue