@@ -0,0 +1,954 @@
+package com.dmitriid.tetrad.transformers;%0A%0Aimport com.dmitriid.tetrad.interfaces.IGenericService;%0Aimport com.dmitriid.tetrad.interfaces.ITransformer;%0Aimport com.dmitriid.tetrad.services.FirehoseMessage;%0A%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Apublic class TransformSlackChannels implements ITransformer %7B%0A%0A    public FirehoseMessage transform(final FirehoseMessage firehoseMessage, final IGenericService service)%7B%0A        FirehoseMessage msg = (FirehoseMessage) firehoseMessage.clone();%0A%0A        Pattern pattern = Pattern.compile(%22%3C#(%5B%5E%5C%5C%7C%3E%5D+)(%7C%5B%5E%3E%5D+)?%3E%22);%0A        Matcher matcher = pattern.matcher(msg.content);%0A%0A        while(matcher.find())%7B%0A            msg.content = msg.content.replace(matcher.group(0), %22#%22 + service.getChannelById(matcher.group(1)));%0A        %7D%0A%0A        return msg;%0A    %7D%0A%0A    @Override%0A    public FirehoseMessage transform(final FirehoseMessage firehoseMessage) %7B%0A        return firehoseMessage;%0A    %7D%0A%7D%0A

Transform Slack channels