Update PengradTelegramBot to improve chat ID retrieval and upgrade Telegram API version

- Refactor chat ID extraction logic into a separate method for clarity and maintainability.
- Handle cases where chat ID may not be accessible, logging a warning when not found.
- Upgrade Telegram Bot API dependency version from 6.2.0 to 7.1.1.
- Adjust BotRequestImpl to accommodate changes in chat ID retrieval logic.
- Make botAtomicReference in App class final for better thread safety.
This commit is contained in:
2026-03-03 13:26:14 +03:00
parent a06f9940ff
commit c43ba2ea8b
5 changed files with 63 additions and 19 deletions

View File

@@ -19,7 +19,7 @@ public class App implements Runnable {
private static final Logger log = LoggerFactory.getLogger(App.class);
private static AtomicReference<PengradTelegramBot> botAtomicReference = new AtomicReference<>();
private static final AtomicReference<PengradTelegramBot> botAtomicReference = new AtomicReference<>();
@CommandLine.Option(names = {"-f", "--file"}, description = "The file with config.")
private String flowFile = "classpath:/flow.xml";