From 47799bb94dc39a365b72eb2ac180e1c5f740dec3 Mon Sep 17 00:00:00 2001 From: woozu-shin Date: Thu, 16 May 2024 08:31:37 +0900 Subject: [PATCH] Change section block --- .../shopping/event/handler/ArticleUpsertEventListener.java | 6 ------ .../engineering/crawl/shopping/util/SlackMessageUtils.java | 7 ++++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/event/handler/ArticleUpsertEventListener.java b/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/event/handler/ArticleUpsertEventListener.java index a241f67..924353a 100644 --- a/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/event/handler/ArticleUpsertEventListener.java +++ b/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/event/handler/ArticleUpsertEventListener.java @@ -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> doAhoCorasick( - List articles) { - return userTrieModel -> doAhocorasick(articles, userTrieModel); - } - private List doAhocorasick(List articles, SubscribedKeywordAggregatedModel trieModel) { if (articles == null || articles.isEmpty()) { diff --git a/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/util/SlackMessageUtils.java b/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/util/SlackMessageUtils.java index 6aff796..963ea39 100644 --- a/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/util/SlackMessageUtils.java +++ b/shopping-crawler/src/main/java/com/myoa/engineering/crawl/shopping/util/SlackMessageUtils.java @@ -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(); } }