From 53d83b720a2e32f601315f56c2e3189cbf9c5bae Mon Sep 17 00:00:00 2001 From: double-beep Date: Sun, 18 Oct 2020 17:09:27 +0000 Subject: [PATCH] Issue #9: Fix rate-limiting pluralisation bug --- src/main/java/org/sobotics/chatexchange/chat/Room.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/sobotics/chatexchange/chat/Room.java b/src/main/java/org/sobotics/chatexchange/chat/Room.java index 4cc262d..aae30f3 100644 --- a/src/main/java/org/sobotics/chatexchange/chat/Room.java +++ b/src/main/java/org/sobotics/chatexchange/chat/Room.java @@ -69,7 +69,7 @@ public final class Room { private static final Logger LOGGER = LoggerFactory.getLogger(Room.class); private static final String SUCCESS = "ok"; - private static final Pattern TRY_AGAIN_PATTERN = Pattern.compile("You can perform this action again in (\\d+) seconds"); + private static final Pattern TRY_AGAIN_PATTERN = Pattern.compile("You can perform this action again in (\\d+) second"); private static final Pattern CURRENT_USERS_PATTERN = Pattern.compile("\\{id:\\s?(\\d+),"); private static final Pattern MARKDOWN_LINK_PATTERN = Pattern.compile("\\[(\\\\]|[^\\]])+\\]\\((https?:)?//(\\\\\\)|\\\\\\(|[^\\s)(])+\\)"); // oh dear god private static final Pattern FAILED_UPLOAD_PATTERN = Pattern.compile("var error = '(.+)';");