From b07793e98698fa99c9a5e3faab40d7b7fe8fa8c9 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sun, 23 Oct 2022 02:43:38 +0300 Subject: [PATCH] Support akkoma custom reactions, worst quality --- mastodon/status.go | 3 +++ templates/reactionspage.tmpl | 4 ++++ templates/status.tmpl | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/mastodon/status.go b/mastodon/status.go index c6cb99e..b2553b4 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -20,6 +20,9 @@ type ReactionsPleroma struct { Count int `json:"count"` Me bool `json:"me"` Name string `json:"name"` + + // For support akkoma reactions :) + Url *string `json:"url"` } type ReplyInfo struct { diff --git a/templates/reactionspage.tmpl b/templates/reactionspage.tmpl index 7f70c4e..9ee21a4 100644 --- a/templates/reactionspage.tmpl +++ b/templates/reactionspage.tmpl @@ -20,7 +20,11 @@
Who reacted
{{range .Reactions}} +{{if .Url}} +
+{{else}}
{{.Name}}
+{{end}} {{template "userlist.tmpl" (WithContext .Accounts $.Ctx)}} {{end}} {{end}} diff --git a/templates/status.tmpl b/templates/status.tmpl index 2e8223d..c317815 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -105,13 +105,21 @@
+ {{if .Url}} + + {{else}} + {{end}}
{{else}}
+ {{if .Url}} + + {{else}} + {{end}}
{{end}} {{end}}