From 9a6518c150d65253864c62731319723eea7b0f0c Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 10 Dec 2020 13:59:35 -0800 Subject: [PATCH] make urls always be external --- suchwow/discord.py | 2 +- suchwow/reddit.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/suchwow/discord.py b/suchwow/discord.py index 872fc7b..7be2b82 100644 --- a/suchwow/discord.py +++ b/suchwow/discord.py @@ -12,7 +12,7 @@ insults = ["fart sacks", "dick lips", "shit stains", "chodes", "dipshits", "dick def post_discord_webhook(post): wallet = wownero.Wallet() post_wow_address = wallet.get_address(account=post.account_index) - content = f"{choice(intro)} {choice(insults)}, new SuchWow post #{post.id} by {post.submitter} is up! Tip WOW to `{post_wow_address}` to show support! {url_for('post.uploaded_file', filename=post.image_name)}" + content = f"{choice(intro)} {choice(insults)}, new SuchWow post #{post.id} by {post.submitter} is up! Tip WOW to `{post_wow_address}` to show support! {url_for('post.uploaded_file', filename=post.image_name, _external=True)}" msg = {"content": content} discord_webhook_url = config.DISCORD_URL r = requests.post(discord_webhook_url, data=msg) diff --git a/suchwow/reddit.py b/suchwow/reddit.py index a23bae4..6796733 100644 --- a/suchwow/reddit.py +++ b/suchwow/reddit.py @@ -35,7 +35,7 @@ class Reddit(object): def make_post(post): wallet = wownero.Wallet() title = f"SuchWow #{post.id} - {post.title}" - url = url_for('post.uploaded_file', filename=post.image_name) + url = url_for('post.uploaded_file', filename=post.image_name, _external=True) _comment = [ f"Submitter: {post.submitter}\n\n", f"Timestamp (UTC): {post.timestamp}\n\n",