Merge pull request #2876 from spjspj/master

Limit messages to 500 characters
This commit is contained in:
spjspj 2017-02-18 20:33:28 +11:00 committed by GitHub
commit 24c08e14e4

View file

@ -132,6 +132,10 @@ public class ChatManager {
chatSessions.get(chatId).broadcastInfoToUser(user, informUser);
return;
}
if (message.length() > 500) {
message = message.replaceFirst("^(.{500}).*", "$1 (rest of message truncated)");
}
String messageToCheck = message;
Matcher matchPattern = cardNamePattern.matcher(message);