From b3236bb931e037ab5ed2f37f7900345dc13df7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Fri, 10 Oct 2025 15:04:09 +0200 Subject: [PATCH] code clean --- .../java/de/ph87/kleinanzeigen/telegram/TelegramBot.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/de/ph87/kleinanzeigen/telegram/TelegramBot.java b/src/main/java/de/ph87/kleinanzeigen/telegram/TelegramBot.java index 1f300b5..498116d 100644 --- a/src/main/java/de/ph87/kleinanzeigen/telegram/TelegramBot.java +++ b/src/main/java/de/ph87/kleinanzeigen/telegram/TelegramBot.java @@ -11,7 +11,6 @@ import jakarta.annotation.PreDestroy; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import org.springframework.context.ApplicationEventPublisher; -import org.springframework.data.jpa.repository.JpaContext; import org.springframework.stereotype.Service; import org.telegram.telegrambots.bots.TelegramLongPollingBot; import org.telegram.telegrambots.meta.TelegramBotsApi; @@ -37,9 +36,7 @@ public class TelegramBot extends TelegramLongPollingBot { private final DefaultBotSession session; - private final JpaContext jpaContext; - - public TelegramBot(final TelegramConfig config, final ObjectMapper objectMapper, final ApplicationEventPublisher publisher, final JpaContext jpaContext) throws TelegramApiException { + public TelegramBot(final TelegramConfig config, final ObjectMapper objectMapper, final ApplicationEventPublisher publisher) throws TelegramApiException { super(config.getToken()); this.config = config; @@ -51,7 +48,6 @@ public class TelegramBot extends TelegramLongPollingBot { session = (DefaultBotSession) api.registerBot(this); log.info("Telegram bot registered."); this.objectMapper = objectMapper; - this.jpaContext = jpaContext; } @PreDestroy