mirror of
https://github.com/correl/mage.git
synced 2024-11-28 11:09:54 +00:00
Limit messages to 500 characters
This commit is contained in:
parent
d71956ef2f
commit
a6e34c040b
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue