Change section block
This commit is contained in:
parent
d6e623cf90
commit
47799bb94d
|
@ -18,7 +18,6 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
|
@ -68,11 +67,6 @@ public class ArticleUpsertEventListener {
|
|||
.forEach(this::notifyMessage);
|
||||
}
|
||||
|
||||
private Function<SubscribedKeywordAggregatedModel, List<ArticleModel>> doAhoCorasick(
|
||||
List<ArticleModel> articles) {
|
||||
return userTrieModel -> doAhocorasick(articles, userTrieModel);
|
||||
}
|
||||
|
||||
private List<ArticleModel> doAhocorasick(List<ArticleModel> articles,
|
||||
SubscribedKeywordAggregatedModel trieModel) {
|
||||
if (articles == null || articles.isEmpty()) {
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.myoa.engineering.crawl.shopping.util;
|
|||
import com.slack.api.model.block.DividerBlock;
|
||||
import com.slack.api.model.block.HeaderBlock;
|
||||
import com.slack.api.model.block.SectionBlock;
|
||||
import com.slack.api.model.block.composition.MarkdownTextObject;
|
||||
import com.slack.api.model.block.composition.PlainTextObject;
|
||||
|
||||
public final class SlackMessageUtils {
|
||||
|
@ -24,9 +25,9 @@ public final class SlackMessageUtils {
|
|||
|
||||
public static SectionBlock ofSection(String message) {
|
||||
return SectionBlock.builder()
|
||||
.text(PlainTextObject.builder()
|
||||
.text(message)
|
||||
.build())
|
||||
.text(MarkdownTextObject.builder()
|
||||
.text(message)
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue