aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/TelegramBotManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/juick/TelegramBotManager.java b/src/main/java/com/juick/TelegramBotManager.java
index 53ef2f47..130934c5 100644
--- a/src/main/java/com/juick/TelegramBotManager.java
+++ b/src/main/java/com/juick/TelegramBotManager.java
@@ -207,7 +207,12 @@ public class TelegramBotManager implements NotificationListener {
Tap to [log into website](%s) to get more info""", user_from.getName(), msgUrl);
telegramNotify(message.from().id(), msg, new com.juick.model.Message());
} else {
- var messageNumber = WebUtils.getMessageNumberFromUrl(webDomain, UriComponentsBuilder.fromUriString(text.trim()).build());
+ int messageNumber = 0;
+ try {
+ messageNumber = WebUtils.getMessageNumberFromUrl(webDomain, UriComponentsBuilder.fromHttpUrl(text.trim()).build());
+ } catch (IllegalArgumentException ignored) {
+
+ }
if (messageNumber > 0) {
var msg = messagesService.getMessage(messageNumber);
if (msg.isPresent()) {