@(u: User, players: List[(Pov, lila.chat.MixedChat)], threads: List[lila.message.Thread], publicLines: List[lila.shutup.PublicLine], spy: lila.security.UserSpy, notes: List[lila.user.Note], history: List[lila.mod.Modlog], priv: Boolean)(implicit ctx: Context) @import lila.hub.actorApi.shutup.PublicSource @moreCss = { @cssTag("mod-communication.css") } @side = {

Return to the report list } @base.layout( title = u.username + " communications", moreCss = moreCss, side = side.some) {

@userLink(u) communications
@if(isGranted(_.ViewPrivateComms)) { @if(priv) { PMs } else { PMs } }

@if(history.nonEmpty) {

Moderation history

@history.map { e =>
@userIdLink(e.mod.some) @e.showAction @u.username @e.details @momentFromNow(e.date)
}
} @if(notes.nonEmpty) {

Notes from other users

@notes.map { note =>
@userIdLink(note.from.some) @momentFromNow(note.date): @richText(note.text)
}
}

Dubious public chats

@if(publicLines.isEmpty) { None! } else { } @if(priv) {

Recent private chats

@players.map { case (pov, chat) => {
@usernameOrAnon(pov.opponent.userId) – @momentFromNow(pov.game.movedAt)
@chat.lines.map { line =>
@userIdLink(line.author.toLowerCase.some, withOnline = false, withTitle = false) @richText(line.text)
}
} }

Recent inbox messages

@threads.map { thread =>

@thread.name @momentFromNow(thread.createdAt) @userIdLink(thread.creatorId.some) -> @userIdLink(thread.invitedId.some)

@thread.posts.map { post =>
@userIdLink(thread.senderOf(post).some) @richText(post.text)
}
}
}

Alternate accounts

@spy.withMeSorted(u).map { case lila.security.UserSpy.OtherUser(o, byIp, byFp) => { } }
@spy.otherUsers.size similar user(s) Same Games Marks IPban Closed Created
@userLink(o, withBestRating = true, params = "?mod") @if(o == u) { - } else { @List(byIp option "IP", byFp option "Print").flatten.mkString(", ") } @o.count.game.localize @if(o.engine){ENGINE} @if(o.booster){BOOSTER} @if(o.troll){SHADOWBAN} @if(o.ipBan){IPBAN} @if(o.disabled){CLOSED} @momentFromNow(o.createdAt)
}