better clean up msgs

pull/9799/head
Thibault Duplessis 2021-09-14 15:10:50 +02:00
parent cca20457a7
commit 7d98857ac6
1 changed files with 2 additions and 2 deletions

View File

@ -33,9 +33,9 @@ object Msg {
}
def make(text: String, user: User.ID): Option[Msg] = {
val cleanText = text.trim
val cleanText = lila.common.String.normalize(text.trim take 8_000)
cleanText.nonEmpty option Msg(
text = cleanText take 10_000,
text = cleanText,
user = user,
date = DateTime.now
)