package failchat.funstream;

import failchat.core.MessageFilter;

import java.util.logging.Logger;

public class AnnounceMessageFilter implements MessageFilter<FsMessage> {
    private static final Logger logger = Logger.getLogger(AnnounceMessageFilter.class.getName());
    private static final String ANNOUNCE_MARKER = "начал трансляцию";

    @Override
    public boolean filterMessage(FsMessage message) {
        if (message.getFrom().getId() == 0 && message.getType().equals("donate") && message.getText().contains(ANNOUNCE_MARKER)) {
            logger.fine("Announce message filtered: " + message.getText());
            return true;
        } else {
            return false;
        }
    }
}

@@ -267,78 +267,8 @@
 ());
-%0A    private static final String ANNOUNCE_MARKER = %22%D0%BD%D0%B0%D1%87%D0%B0%D0%BB %D1%82%D1%80%D0%B0%D0%BD%D1%81%D0%BB%D1%8F%D1%86%D0%B8%D1%8E%22;
 %0A%0A  
@@ -360,111 +360,32 @@
 .get
-From().getId() == 0 && message.getType().equals(%22donate%22) && message.getText().contains(ANNOUNCE_MARKER
+Type().equals(%22announce%22
 )) %7B

Fix for AnnounceMessageFilter