From 094b8cc7afe2f854d7bdde5ad239867c8e54e1f3 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 20 Apr 2022 11:35:05 +0200 Subject: style(tazjin/tgsa): Move attribution outside of quote body When quoting a post containing a tgsa quote, the entire quote was previously erased. Doing it this way will leave the Telegram link in it. Change-Id: I53bfadd0615734f7e219b20509858d9b73c908a4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5482 Reviewed-by: tazjin Autosubmit: tazjin Tested-by: BuildkiteCI --- users/tazjin/tgsa/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users') diff --git a/users/tazjin/tgsa/src/main.rs b/users/tazjin/tgsa/src/main.rs index 14e2162f4df1..d4bce1e0bcd2 100644 --- a/users/tazjin/tgsa/src/main.rs +++ b/users/tazjin/tgsa/src/main.rs @@ -153,14 +153,14 @@ fn to_bbcode(link: &TgLink, msg: &TgMessage) -> String { out.push_str(message); } + out.push_str("\n[/quote]\n"); + out.push_str(&format!( - "\n\n[sub](from [url=\"{}\"]{}[/url], via [url=\"https://tgsa.tazj.in\"]tgsa[/url])[/sub]", + "[sub](from [url=\"{}\"]{}[/url], via [url=\"https://tgsa.tazj.in\"]tgsa[/url])[/sub]\n", link.to_url(), link.human_friendly_url(), )); - out.push_str("\n[/quote]\n"); - out } -- cgit 1.4.1