From 54185bfb20439c3f57fc4f4362d4371392def9e8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 23 Apr 2023 09:49:43 +0100 Subject: [PATCH] Links with payment relationship show the buy button --- webapp_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp_utils.py b/webapp_utils.py index 2776998f0..2132aaa5f 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -2231,6 +2231,11 @@ def get_buy_links(post_json_object: str, translate: {}, buy_sites: {}) -> {}: '://' not in item['href'] or \ ' ' in item['href']: continue + if item.get('rel'): + if item['rel'] in ('payment', 'donate', 'donation', + 'buy', 'purchase'): + links[site.title()] = item['href'] + continue if buy_sites: # limited to an allowlist of buying sites for site, buy_domain in buy_sites.items():