From 7c238b44c8d459d694e71cb14ed421b5b56cf537 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Sat, 4 Apr 2026 23:35:22 +0000 Subject: [PATCH] fix: accept domain-only URLs like google.com The is_url() function now accepts any string with a dot and no spaces, not just URLs with http:// or containing /. This allows /update 2 -link google.com to properly set the link instead of treating google.com as text. --- apps/telegram-bot/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/telegram-bot/commands.py b/apps/telegram-bot/commands.py index 42b907b..23f8bef 100644 --- a/apps/telegram-bot/commands.py +++ b/apps/telegram-bot/commands.py @@ -71,7 +71,9 @@ def parse_args( return False if s.startswith("http://") or s.startswith("https://"): return True - return "." in s and "/" in s + if "." in s and " " not in s: + return True + return False i = 0 while i < len(args):