From 3f4be7b0aedd99d1b8c1bb6ef681bcb16c2d5680 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Tue, 3 May 2022 18:32:23 -0400 Subject: [PATCH] make rhash optional --- TODO.md | 1 + telegram/telegram.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/TODO.md b/TODO.md index 5d319fd..2bf0581 100644 --- a/TODO.md +++ b/TODO.md @@ -14,6 +14,7 @@ * ✓ Wrap content inside item ⚠️ atom calls it entry * ✓ Implement atom * ✓ Cleanup +* Show Feed name instead of Link * Change flags to os.Args[1] for config path * Make Rhash optional diff --git a/telegram/telegram.go b/telegram/telegram.go index f6bee1e..91e9e17 100644 --- a/telegram/telegram.go +++ b/telegram/telegram.go @@ -83,6 +83,9 @@ func NewTelegramSender(transport http.RoundTripper, authToken string) TelegramSe } func genIVLink(link, rhash string) string { + if rhash == "" { + return link + } query := url.Values{} query.Set("url", link) query.Set("rhash", rhash)