From 7f13cef76d3e96443d086402a75b48608fc81d71 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Wed, 15 Feb 2023 21:52:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- .../bot/gitlab/telegram/service/StartNotify.java | 9 ++++----- .../service/notify/NewProjectNotifyGenerator.java | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 2c581e2..f61a649 100644 --- a/pom.xml +++ b/pom.xml @@ -107,13 +107,13 @@ dev.struchkov.haiti haiti-utils - 2.3.4 + 2.5.0 dev.struchkov.haiti haiti-exception - 2.3.4 + 2.5.0 diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/StartNotify.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/StartNotify.java index c41b20e..858bd08 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/StartNotify.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/StartNotify.java @@ -27,11 +27,10 @@ public class StartNotify { final BoxAnswer boxAnswer = BoxAnswer.builder() .recipientPersonId(personProperty.getTelegramId()) .message( - new StringBuilder() - .append("Hello. I wish you a productive day :)") - .append("\n-- -- -- -- --\n") - .append("Version ").append(appProperty.getVersion()).append(" | Developer: [uPagge](https://mark.struchkov.dev)") - .toString() + "Hello. I wish you a productive work day \uD83C\uDF40" + + "\n-- -- -- -- --\n" + + "Version " + appProperty.getVersion() + + "\nDeveloper: [uPagge](https://mark.struchkov.dev)" ).build(); sending.send(boxAnswer); diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java index a20f1b0..7e2ba59 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewProjectNotifyGenerator.java @@ -4,6 +4,7 @@ import dev.struchkov.bot.gitlab.context.domain.notify.project.NewProjectNotify; import dev.struchkov.bot.gitlab.context.utils.Icons; import dev.struchkov.bot.gitlab.telegram.utils.Const; import dev.struchkov.godfather.main.domain.BoxAnswer; +import dev.struchkov.haiti.utils.Checker; import dev.struchkov.haiti.utils.Strings; import org.springframework.stereotype.Component; @@ -23,7 +24,7 @@ public class NewProjectNotifyGenerator implements NotifyBoxAnswerGenerator optDescription = Optional.ofNullable(notify.getProjectDescription()) - .filter(Strings.EMPTY::equals) + .filter(Checker::checkNotBlank) .map(Strings::escapeMarkdown); final StringBuilder builder = new StringBuilder(Icons.FUN).append("* New project*")