1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

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.
This commit is contained in:
Rohan Kumar 2022-12-19 19:53:41 -08:00
parent 8709bf9ec2
commit 5f1cf3b2b2
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,4 @@
https://www.tinybrain.fans/accessibility.html,https://tinybrain.fans/accessibility.html 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/post/twitter/seirdy/1536747178877673475,https://archive.today/Mzo9v
https://brid.gy/comment/mastodon/@Seirdy@pleroma.envs.net/ANUjukccjwEmivz3ia/ANUmmjSDUviUeCz42S,https://archive.today/hxOsO 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/

1 https://www.tinybrain.fans/accessibility.html https://tinybrain.fans/accessibility.html
2 https://brid.gy/post/twitter/seirdy/1536747178877673475 https://archive.today/Mzo9v
3 https://brid.gy/comment/mastodon/@Seirdy@pleroma.envs.net/ANUjukccjwEmivz3ia/ANUmmjSDUviUeCz42S https://archive.today/hxOsO
4 https://wonderfall.dev/fdroid-issues/ https://privsec.dev/posts/android/f-droid-security-issues/

View file

@ -80,7 +80,12 @@
{{ end -}} {{ end -}}
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">liked</a> this <a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">liked</a> this
{{ else -}} {{ else -}}
{{- if findRE `^https://brid.gy/[^/]*/mastodon` $webmention.source -}}
{{- $canonicalSrc := replaceRE "https://brid.gy/.*pleroma.envs.net/([^/]*)(.*)?" `https://pleroma.envs.net/notice/$1` $src -}}
<a class="u-url" itemprop="url" href="{{ $canonicalSrc }}" rel="nofollow ugc">
{{- else -}}
<a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc"> <a class="u-url" itemprop="url" href="{{ $src }}" rel="nofollow ugc">
{{- end -}}
<span itemprop="name" class="p-name"> <span itemprop="name" class="p-name">
{{ if $webmention.title -}} {{ if $webmention.title -}}
{{ $title | truncate 200 | replaceRE ` \n` ` {{ $title | truncate 200 | replaceRE ` \n` `