diff --git a/pom.xml b/pom.xml
index 46736c1..f71600b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
UTF-8
UTF-8
- 0.0.6
+ 0.0.7
6.0.1
3.10.1
diff --git a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramBot.java b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramBot.java
index ae098f6..c8c0c5f 100644
--- a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramBot.java
+++ b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramBot.java
@@ -1,6 +1,6 @@
package dev.struchkov.godfather.telegram;
-import dev.struchkov.godfather.telegram.listen.EventDistributorImpl;
+import dev.struchkov.godfather.telegram.listen.EventDistributorService;
import org.jetbrains.annotations.NotNull;
import org.telegram.telegrambots.meta.bots.AbsSender;
@@ -13,6 +13,6 @@ public interface TelegramBot {
AbsSender getAdsSender();
- void initEventDistributor(@NotNull EventDistributorImpl eventDistributor);
+ void initEventDistributor(@NotNull EventDistributorService eventDistributor);
}
diff --git a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramPollingBot.java b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramPollingBot.java
index a4eb11b..d567962 100644
--- a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramPollingBot.java
+++ b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/TelegramPollingBot.java
@@ -2,15 +2,13 @@ package dev.struchkov.godfather.telegram;
import dev.struchkov.godfather.telegram.config.TelegramPollingConfig;
import dev.struchkov.godfather.telegram.listen.EventDistributor;
-import dev.struchkov.godfather.telegram.listen.EventDistributorImpl;
+import dev.struchkov.godfather.telegram.listen.EventDistributorService;
import org.jetbrains.annotations.NotNull;
import org.telegram.telegrambots.bots.DefaultBotOptions;
import org.telegram.telegrambots.bots.TelegramLongPollingBot;
import org.telegram.telegrambots.meta.api.objects.Update;
import org.telegram.telegrambots.meta.bots.AbsSender;
-import java.util.Optional;
-
/**
* TODO: Добавить описание класса.
*
@@ -32,8 +30,8 @@ public class TelegramPollingBot extends TelegramLongPollingBot implements Telegr
@Override
public void onUpdateReceived(Update update) {
- if (eventDistributor != null) {
- Optional.ofNullable(update).ifPresent(newUpdate -> eventDistributor.processing(update));
+ if (update != null && eventDistributor != null) {
+ eventDistributor.processing(update);
}
}
@@ -53,7 +51,7 @@ public class TelegramPollingBot extends TelegramLongPollingBot implements Telegr
}
@Override
- public void initEventDistributor(@NotNull EventDistributorImpl eventDistributor) {
+ public void initEventDistributor(@NotNull EventDistributorService eventDistributor) {
this.eventDistributor = eventDistributor;
}
diff --git a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/autoresponder/MessageAutoresponderTelegram.java b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/autoresponder/MessageAutoresponderTelegram.java
index 545f39f..cc05be1 100644
--- a/telegram-core/src/main/java/dev/struchkov/godfather/telegram/autoresponder/MessageAutoresponderTelegram.java
+++ b/telegram-core/src/main/java/dev/struchkov/godfather/telegram/autoresponder/MessageAutoresponderTelegram.java
@@ -1,13 +1,12 @@
package dev.struchkov.godfather.telegram.autoresponder;
-import dev.struchkov.autoresponder.repository.UnitPointerRepository;
import dev.struchkov.godfather.context.domain.content.Mail;
-import dev.struchkov.godfather.context.service.MessageService;
+import dev.struchkov.godfather.context.service.PersonSettingService;
+import dev.struchkov.godfather.context.service.UnitPointerService;
import dev.struchkov.godfather.context.service.sender.Sending;
import dev.struchkov.godfather.core.GeneralAutoResponder;
-import dev.struchkov.godfather.core.domain.unit.MainUnit;
-import java.util.Set;
+import java.util.List;
/**
* TODO: Добавить описание класса.
@@ -17,11 +16,12 @@ import java.util.Set;
public class MessageAutoresponderTelegram extends GeneralAutoResponder {
public MessageAutoresponderTelegram(
- Set menuUnit, Sending sending,
- MessageService messageService,
- UnitPointerRepository unitPointerRepository
+ Sending sending,
+ PersonSettingService personSettingService,
+ UnitPointerService unitPointerService,
+ List