From 5f1cf3b2b2aff00e0ee2a8c156b49db6ca294ea7 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Mon, 19 Dec 2022 19:53:41 -0800 Subject: [PATCH] Use pleroma.envs.net links when possible Should reduce dependency on brid.gy a little; once a mention is received, it no longer needs brid.gy to be up and running. --- csv/rewrites.csv | 1 + layouts/partials/webmentions.html | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/csv/rewrites.csv b/csv/rewrites.csv index da282f8..aa74001 100644 --- a/csv/rewrites.csv +++ b/csv/rewrites.csv @@ -1,3 +1,4 @@ https://www.tinybrain.fans/accessibility.html,https://tinybrain.fans/accessibility.html https://brid.gy/post/twitter/seirdy/1536747178877673475,https://archive.today/Mzo9v https://brid.gy/comment/mastodon/@Seirdy@pleroma.envs.net/ANUjukccjwEmivz3ia/ANUmmjSDUviUeCz42S,https://archive.today/hxOsO +https://wonderfall.dev/fdroid-issues/,https://privsec.dev/posts/android/f-droid-security-issues/ diff --git a/layouts/partials/webmentions.html b/layouts/partials/webmentions.html index f8e94a1..17501e7 100644 --- a/layouts/partials/webmentions.html +++ b/layouts/partials/webmentions.html @@ -80,7 +80,12 @@ {{ end -}} this {{ else -}} + {{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}} + {{- $canonicalSrc := replaceRE "https://brid.gy/.*pleroma.envs.net/([^/]*)(.*)?" `https://pleroma.envs.net/notice/$1` $src -}} +