diff options
author | Vincent Ambo <mail@tazj.in> | 2022-04-17T19·54+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-04-17T20·01+0000 |
commit | 6c8841c1763075f5b37a2868b3fb6fb3679bb84f (patch) | |
tree | 66eb1141fae1a9521f2a2a7fa5e58f985ab88d86 /users/tazjin | |
parent | 2586abf6c2055a1d0c5ad3624c1ef67c822312ef (diff) |
chore(tazjin/tgsa): Update quote footer text r/3973
Change-Id: I39ea4a40d9265d06193e3bddede157b10066da06 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5477 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin')
-rw-r--r-- | users/tazjin/tgsa/src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/users/tazjin/tgsa/src/main.rs b/users/tazjin/tgsa/src/main.rs index 93c76c3cfd4f..341e1b163986 100644 --- a/users/tazjin/tgsa/src/main.rs +++ b/users/tazjin/tgsa/src/main.rs @@ -9,6 +9,10 @@ struct TgLink { } impl TgLink { + fn human_friendly_url(&self) -> String { + format!("t.me/{}/{}", self.username, self.message_id) + } + fn to_url(&self) -> String { format!("https://t.me/{}/{}?embed=1", self.username, self.message_id) } @@ -153,8 +157,9 @@ fn to_bbcode(link: &TgLink, msg: &TgMessage) -> Result<String> { } out.push_str(&format!( - "\n\n[sub](via [url=\"{}\"]Telegram[/url])[/sub]", + "\n\n[sub](from [url=\"{}\"]{}[/url], via [url=\"https://tgsa.tazj.in\"]tgsa[/url])[/sub]", link.to_url(), + link.human_friendly_url(), )); out.push_str("\n[/quote]\n"); |