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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user