Change section block

This commit is contained in:
woozu-shin 2024-05-16 08:31:37 +09:00
parent d6e623cf90
commit 47799bb94d
2 changed files with 4 additions and 9 deletions

View File

@ -18,7 +18,6 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component @Component
@ -68,11 +67,6 @@ public class ArticleUpsertEventListener {
.forEach(this::notifyMessage); .forEach(this::notifyMessage);
} }
private Function<SubscribedKeywordAggregatedModel, List<ArticleModel>> doAhoCorasick(
List<ArticleModel> articles) {
return userTrieModel -> doAhocorasick(articles, userTrieModel);
}
private List<ArticleModel> doAhocorasick(List<ArticleModel> articles, private List<ArticleModel> doAhocorasick(List<ArticleModel> articles,
SubscribedKeywordAggregatedModel trieModel) { SubscribedKeywordAggregatedModel trieModel) {
if (articles == null || articles.isEmpty()) { if (articles == null || articles.isEmpty()) {

View File

@ -3,6 +3,7 @@ package com.myoa.engineering.crawl.shopping.util;
import com.slack.api.model.block.DividerBlock; import com.slack.api.model.block.DividerBlock;
import com.slack.api.model.block.HeaderBlock; import com.slack.api.model.block.HeaderBlock;
import com.slack.api.model.block.SectionBlock; import com.slack.api.model.block.SectionBlock;
import com.slack.api.model.block.composition.MarkdownTextObject;
import com.slack.api.model.block.composition.PlainTextObject; import com.slack.api.model.block.composition.PlainTextObject;
public final class SlackMessageUtils { public final class SlackMessageUtils {
@ -24,9 +25,9 @@ public final class SlackMessageUtils {
public static SectionBlock ofSection(String message) { public static SectionBlock ofSection(String message) {
return SectionBlock.builder() return SectionBlock.builder()
.text(PlainTextObject.builder() .text(MarkdownTextObject.builder()
.text(message) .text(message)
.build()) .build())
.build(); .build();
} }
} }