From 913f411987b966bf0f3676dbc09268d5a023c8d1 Mon Sep 17 00:00:00 2001 From: exslims Date: Mon, 22 Jan 2018 23:32:43 +0400 Subject: [PATCH] #237 --- .../mercury/platform/ui/frame/titled/ChatScannerFrame.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app-ui/src/main/java/com/mercury/platform/ui/frame/titled/ChatScannerFrame.java b/app-ui/src/main/java/com/mercury/platform/ui/frame/titled/ChatScannerFrame.java index 73432411..27327300 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/frame/titled/ChatScannerFrame.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/frame/titled/ChatScannerFrame.java @@ -206,7 +206,9 @@ protected MessageMatcher match() { if (!message.contains("] $") && !message.contains("] #")) { return false; } - message = StringUtils.substringAfter(message, ":").toLowerCase(); + final String separator = message.contains("] $") ? "] $" : "] #"; + message = StringUtils.substringAfter(message, separator).toLowerCase(); + message = StringUtils.substringAfter(message, ": ").toLowerCase(); return notContains.stream().noneMatch(message::contains) && contains.stream().anyMatch(message::contains); };