From 1b63aa1f431b2a26f4fa193b351c284449e9a15a Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 18 Feb 2023 20:47:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitlab-app/pom.xml | 4 - gitlab-app/src/main/resources/application.yml | 2 +- pom.xml | 18 +- telegram-bot/pom.xml | 12 +- .../telegram/config/TelegramBotConfig.java | 178 ------------------ .../bot/gitlab/telegram/unit/MenuConfig.java | 9 +- .../telegram/unit/command/AnswerNoteUnit.java | 5 +- .../unit/command/DeleteMessageUnit.java | 5 +- .../unit/command/DisableNotifyMrUnit.java | 5 +- .../unit/command/DisableNotifyThreadUnit.java | 5 +- .../unit/command/EnableProjectNotify.java | 5 +- .../telegram/unit/flow/InitSettingFlow.java | 9 +- 12 files changed, 29 insertions(+), 228 deletions(-) delete mode 100644 telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/config/TelegramBotConfig.java diff --git a/gitlab-app/pom.xml b/gitlab-app/pom.xml index c428c9b..5ff9a70 100644 --- a/gitlab-app/pom.xml +++ b/gitlab-app/pom.xml @@ -51,10 +51,6 @@ org.springframework.boot spring-boot-starter - - org.springframework.boot - spring-boot-starter-actuator - diff --git a/gitlab-app/src/main/resources/application.yml b/gitlab-app/src/main/resources/application.yml index a72723b..7986763 100644 --- a/gitlab-app/src/main/resources/application.yml +++ b/gitlab-app/src/main/resources/application.yml @@ -21,7 +21,7 @@ logging: level: "dev.struchkov": ${LOG_LEVEL:info} -telegram-config: +telegram-bot: bot-username: ${TELEGRAM_BOT_USERNAME} bot-token: ${TELEGRAM_BOT_TOKEN} proxy-config: diff --git a/pom.xml b/pom.xml index ff773ce..c2b1039 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ UTF-8 UTF-8 - 0.0.49 + 0.0.50-SNAPSHOT 2.6.0 0.0.9 0.0.5 @@ -129,20 +129,8 @@ dev.struchkov.godfather.telegram - telegram-consumer-simple - ${godfather.telegram.core.version} - - - - dev.struchkov.godfather.telegram - telegram-core-simple - ${godfather.telegram.core.version} - - - - dev.struchkov.godfather.telegram - telegram-sender-simple - ${godfather.telegram.core.version} + telegram-bot-spring-boot-starter + ${godfather.telegram.version} diff --git a/telegram-bot/pom.xml b/telegram-bot/pom.xml index 9407de5..9bcda07 100644 --- a/telegram-bot/pom.xml +++ b/telegram-bot/pom.xml @@ -19,17 +19,7 @@ dev.struchkov.godfather.telegram - telegram-consumer-simple - - - - dev.struchkov.godfather.telegram - telegram-sender-simple - - - - dev.struchkov.godfather.telegram - telegram-core-simple + telegram-bot-spring-boot-starter diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/config/TelegramBotConfig.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/config/TelegramBotConfig.java deleted file mode 100644 index 4fb6e03..0000000 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/config/TelegramBotConfig.java +++ /dev/null @@ -1,178 +0,0 @@ -package dev.struchkov.bot.gitlab.telegram.config; - -import dev.struchkov.bot.gitlab.telegram.service.ReplaceUrlLocalhost; -import dev.struchkov.bot.gitlab.telegram.unit.MenuConfig; -import dev.struchkov.bot.gitlab.telegram.unit.command.AnswerNoteUnit; -import dev.struchkov.bot.gitlab.telegram.unit.command.DeleteMessageUnit; -import dev.struchkov.bot.gitlab.telegram.unit.command.DisableNotifyMrUnit; -import dev.struchkov.bot.gitlab.telegram.unit.command.DisableNotifyThreadUnit; -import dev.struchkov.bot.gitlab.telegram.unit.command.EnableProjectNotify; -import dev.struchkov.bot.gitlab.telegram.unit.flow.InitSettingFlow; -import dev.struchkov.godfather.main.core.unit.TypeUnit; -import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.context.service.ErrorHandler; -import dev.struchkov.godfather.simple.context.service.EventHandler; -import dev.struchkov.godfather.simple.context.service.PersonSettingService; -import dev.struchkov.godfather.simple.context.service.Sending; -import dev.struchkov.godfather.simple.context.service.UnitPointerService; -import dev.struchkov.godfather.simple.core.action.AnswerTextAction; -import dev.struchkov.godfather.simple.core.action.cmd.RollBackCmdAction; -import dev.struchkov.godfather.simple.core.provider.StoryLineHandler; -import dev.struchkov.godfather.simple.core.service.PersonSettingServiceImpl; -import dev.struchkov.godfather.simple.core.service.StorylineContextMapImpl; -import dev.struchkov.godfather.simple.core.service.StorylineMailService; -import dev.struchkov.godfather.simple.core.service.StorylineService; -import dev.struchkov.godfather.simple.core.service.UnitPointerServiceImpl; -import dev.struchkov.godfather.simple.data.StorylineContext; -import dev.struchkov.godfather.simple.data.repository.impl.PersonSettingLocalRepository; -import dev.struchkov.godfather.simple.data.repository.impl.StorylineMapRepository; -import dev.struchkov.godfather.simple.data.repository.impl.UnitPointLocalRepository; -import dev.struchkov.godfather.telegram.domain.config.ProxyConfig; -import dev.struchkov.godfather.telegram.domain.config.TelegramConnectConfig; -import dev.struchkov.godfather.telegram.main.context.TelegramConnect; -import dev.struchkov.godfather.telegram.simple.consumer.EventDistributorService; -import dev.struchkov.godfather.telegram.simple.context.service.EventDistributor; -import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; -import dev.struchkov.godfather.telegram.simple.context.service.TelegramService; -import dev.struchkov.godfather.telegram.simple.core.MailAutoresponderTelegram; -import dev.struchkov.godfather.telegram.simple.core.TelegramConnectBot; -import dev.struchkov.godfather.telegram.simple.core.service.SenderMapRepository; -import dev.struchkov.godfather.telegram.simple.core.service.TelegramServiceImpl; -import dev.struchkov.godfather.telegram.simple.sender.TelegramSender; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.EnableScheduling; - -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -/** - * @author upagge [30.01.2020] - */ -@Slf4j -@Configuration -@EnableScheduling -public class TelegramBotConfig { - - @Bean("messageExecutorService") - public ExecutorService executorService() { - return Executors.newFixedThreadPool(3); - } - - @Bean - public TelegramService telegramService(TelegramConnect telegramConnect) { - return new TelegramServiceImpl(telegramConnect); - } - - @Bean - public AnswerTextAction answerTextAction(Sending sending) { - return new AnswerTextAction(sending); - } - - @Bean - public StorylineContext storylineContext() { - return new StorylineContextMapImpl(); - } - - @Bean - public UnitPointerService unitPointerService() { - return new UnitPointerServiceImpl(new UnitPointLocalRepository()); - } - - @Bean - public PersonSettingService personSettingService() { - return new PersonSettingServiceImpl(new PersonSettingLocalRepository()); - } - - @Bean - public StorylineService storylineService( - UnitPointerService unitPointerService, - - MenuConfig menuConfig, - InitSettingFlow unitConfig, - AnswerNoteUnit commandUnit, - DeleteMessageUnit deleteMessageUnit, - DisableNotifyMrUnit disableNotifyMrUnit, - DisableNotifyThreadUnit disableNotifyThreadUnit, - EnableProjectNotify enableProjectNotify - ) { - final List config = List.of(menuConfig, unitConfig, commandUnit, deleteMessageUnit, disableNotifyMrUnit, - disableNotifyThreadUnit, enableProjectNotify); - - return new StorylineMailService( - unitPointerService, - new StorylineMapRepository(), - config - ); - } - - @Bean - public MailAutoresponderTelegram messageAutoresponderTelegram( - @Qualifier("messageExecutorService") ExecutorService executorService, - TelegramSending sending, - PersonSettingService personSettingService, - ErrorHandler errorHandler, - AnswerTextAction answerTextAction, - - StorylineService storylineService - ) { - final MailAutoresponderTelegram autoresponder = new MailAutoresponderTelegram( - sending, personSettingService, storylineService - ); - autoresponder.initActionUnit(TypeUnit.BACK_CMD, new RollBackCmdAction<>(storylineService)); - autoresponder.setExecutorService(executorService); - autoresponder.setErrorHandler(errorHandler); - autoresponder.initTextAnswerActionUnit(answerTextAction); - return autoresponder; - } - - @Bean - public TelegramSending sending( - TelegramConnect telegramConnect, - ReplaceUrlLocalhost replaceUrlLocalhost - ) { - final TelegramSender telegramSender = new TelegramSender(telegramConnect); - telegramSender.addPreSendProcess(replaceUrlLocalhost); - telegramSender.setSenderRepository(new SenderMapRepository()); - return telegramSender; - } - - @Bean - public TelegramConnectBot telegramConnect(TelegramConnectConfig telegramConfig) { - return new TelegramConnectBot(telegramConfig); - } - - @Bean - @ConfigurationProperties("telegram-proxy-config") - @ConditionalOnProperty(prefix = "telegram-config.proxy-config.enable", value = "true") - public ProxyConfig proxyConfig() { - return new ProxyConfig(); - } - - @Bean - @ConfigurationProperties("telegram-config") - public TelegramConnectConfig telegramConfig() { - return new TelegramConnectConfig(); - } - - @Bean - public StoryLineHandler storyLineHandler( - MailAutoresponderTelegram mailAutoresponderTelegram - ) { - return new StoryLineHandler(mailAutoresponderTelegram); - } - - @Bean - public EventDistributor eventDistributor( - TelegramConnectBot telegramConnect, - List eventProviders - ) { - return new EventDistributorService(telegramConnect, eventProviders); - } - -} diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/MenuConfig.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/MenuConfig.java index 85be065..6353bd1 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/MenuConfig.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/MenuConfig.java @@ -13,14 +13,14 @@ import dev.struchkov.bot.gitlab.core.service.parser.ProjectParser; import dev.struchkov.bot.gitlab.telegram.utils.UnitName; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; -import dev.struchkov.godfather.simple.core.unit.MainUnit; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import dev.struchkov.godfather.telegram.domain.attachment.LinkAttachment; import dev.struchkov.godfather.telegram.domain.keyboard.InlineKeyBoard; import dev.struchkov.godfather.telegram.main.context.MailPayload; import dev.struchkov.godfather.telegram.main.core.util.Attachments; -import dev.struchkov.godfather.telegram.simple.context.service.TelegramService; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import dev.struchkov.haiti.utils.Checker; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -53,14 +53,13 @@ import static java.util.Collections.singleton; */ @Component @RequiredArgsConstructor -public class MenuConfig { +public class MenuConfig implements UnitConfiguration { private final GitlabProperty gitlabProperty; private final PersonInformation personInformation; private final ProjectParser projectParser; - private final TelegramService telegramService; private final ProjectService projectService; private final NoteService noteService; private final MergeRequestsService mergeRequestsService; diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/AnswerNoteUnit.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/AnswerNoteUnit.java index 48dc1bf..ddf9331 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/AnswerNoteUnit.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/AnswerNoteUnit.java @@ -7,9 +7,10 @@ import dev.struchkov.bot.gitlab.context.service.DiscussionService; import dev.struchkov.bot.gitlab.context.service.NoteService; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; import dev.struchkov.godfather.telegram.domain.attachment.LinkAttachment; import dev.struchkov.godfather.telegram.main.core.util.Attachments; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import dev.struchkov.haiti.utils.Checker; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -24,7 +25,7 @@ import static dev.struchkov.godfather.simple.domain.BoxAnswer.boxAnswer; @Component @RequiredArgsConstructor -public class AnswerNoteUnit { +public class AnswerNoteUnit implements UnitConfiguration { private static final Pattern NOTE_LINK = Pattern.compile("#note_\\d+$"); diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DeleteMessageUnit.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DeleteMessageUnit.java index 2e20aec..20c273c 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DeleteMessageUnit.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DeleteMessageUnit.java @@ -4,10 +4,11 @@ import dev.struchkov.bot.gitlab.context.domain.PersonInformation; import dev.struchkov.bot.gitlab.context.service.AppSettingService; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment; import dev.struchkov.godfather.telegram.main.core.util.Attachments; import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -17,7 +18,7 @@ import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.DELETE_MESSAGE; @Component @RequiredArgsConstructor -public class DeleteMessageUnit { +public class DeleteMessageUnit implements UnitConfiguration { private final TelegramSending telegramSending; private final PersonInformation personInformation; diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyMrUnit.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyMrUnit.java index b03b9f5..5e30c68 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyMrUnit.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyMrUnit.java @@ -6,11 +6,12 @@ import dev.struchkov.bot.gitlab.context.service.MergeRequestsService; import dev.struchkov.bot.gitlab.context.utils.Icons; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment.Arg; import dev.struchkov.godfather.telegram.main.core.util.Attachments; import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -29,7 +30,7 @@ import static dev.struchkov.godfather.telegram.domain.keyboard.InlineKeyBoard.in @Component @RequiredArgsConstructor -public class DisableNotifyMrUnit { +public class DisableNotifyMrUnit implements UnitConfiguration { public static final String WARNING_ABOUT_DISABLE_NOTIFY = Icons.DISABLE_NOTIFY + """ *Disabling notifications* diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyThreadUnit.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyThreadUnit.java index ea4ac01..e55e847 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyThreadUnit.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/DisableNotifyThreadUnit.java @@ -6,11 +6,12 @@ import dev.struchkov.bot.gitlab.context.service.DiscussionService; import dev.struchkov.bot.gitlab.context.utils.Icons; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment.Arg; import dev.struchkov.godfather.telegram.main.core.util.Attachments; import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -29,7 +30,7 @@ import static dev.struchkov.godfather.telegram.domain.keyboard.InlineKeyBoard.in @Component @RequiredArgsConstructor -public class DisableNotifyThreadUnit { +public class DisableNotifyThreadUnit implements UnitConfiguration { public static final String WARNING_ABOUT_DISABLE_NOTIFY = Icons.DISABLE_NOTIFY + """ *Disabling notifications* diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/EnableProjectNotify.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/EnableProjectNotify.java index 8801249..45b723b 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/EnableProjectNotify.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/command/EnableProjectNotify.java @@ -8,11 +8,12 @@ import dev.struchkov.bot.gitlab.context.utils.Icons; import dev.struchkov.bot.gitlab.telegram.utils.UnitName; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment.Arg; import dev.struchkov.godfather.telegram.main.core.util.Attachments; import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -26,7 +27,7 @@ import static dev.struchkov.godfather.simple.domain.BoxAnswer.replaceBoxAnswer; @Component @RequiredArgsConstructor -public class EnableProjectNotify { +public class EnableProjectNotify implements UnitConfiguration { private final ProjectService projectService; private final MergeRequestsService mergeRequestsService; diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java index f129323..f26dc99 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java @@ -13,12 +13,13 @@ import dev.struchkov.bot.gitlab.core.service.parser.PipelineParser; import dev.struchkov.bot.gitlab.core.service.parser.ProjectParser; import dev.struchkov.godfather.main.domain.annotation.Unit; import dev.struchkov.godfather.main.domain.content.Mail; -import dev.struchkov.godfather.simple.core.unit.AnswerText; -import dev.struchkov.godfather.simple.core.unit.MainUnit; import dev.struchkov.godfather.simple.domain.BoxAnswer; +import dev.struchkov.godfather.simple.domain.unit.AnswerText; +import dev.struchkov.godfather.simple.domain.unit.MainUnit; import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment; import dev.struchkov.godfather.telegram.main.core.util.Attachments; import dev.struchkov.godfather.telegram.simple.context.service.TelegramSending; +import dev.struchkov.godfather.telegram.starter.UnitConfiguration; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -41,9 +42,9 @@ import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PARSER_OWNER import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PARSER_PRIVATE_PROJECT; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PRIVACY_SETTING; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PRIVACY_SETTING_THREAD_LEVEL; -import static dev.struchkov.godfather.main.core.unit.UnitActiveType.AFTER; import static dev.struchkov.godfather.main.domain.keyboard.button.SimpleButton.simpleButton; import static dev.struchkov.godfather.main.domain.keyboard.simple.SimpleKeyBoardLine.simpleLine; +import static dev.struchkov.godfather.main.domain.unit.UnitActiveType.AFTER; import static dev.struchkov.godfather.simple.domain.BoxAnswer.boxAnswer; import static dev.struchkov.godfather.simple.domain.BoxAnswer.replaceBoxAnswer; import static dev.struchkov.godfather.telegram.domain.keyboard.InlineKeyBoard.inlineKeyBoard; @@ -60,7 +61,7 @@ import static java.text.MessageFormat.format; */ @Component @RequiredArgsConstructor -public class InitSettingFlow { +public class InitSettingFlow implements UnitConfiguration { private final TelegramSending sending;