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

Fix: webmentions: support "likes" with no author

Sometimes an author name isn't parsed; switch to title in those cases.
This commit is contained in:
Rohan Kumar 2021-03-02 16:40:15 -08:00
parent 8de296971f
commit 981babb95d
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -38,7 +38,7 @@
<time datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $webmention.created_at }}">{{ dateFormat "2006-01-02" $webmention.created_at }}</time> <time datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $webmention.created_at }}">{{ dateFormat "2006-01-02" $webmention.created_at }}</time>
<br> <br>
{{ if (eq $webmention.type "like") -}} {{ if (eq $webmention.type "like") -}}
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.author_name }}</a> liked this <a href="{{ $webmention.source }}" rel="nofollow">{{ if $webmention.author_name }}{{ $webmention.author_name }}{{ else }}{{ $webmention.title }}{{ end }}</a> liked this
{{else -}} {{else -}}
<a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.title }}</a> <a href="{{ $webmention.source }}" rel="nofollow">{{ $webmention.title }}</a>
{{- end }} {{- end }}