diff options
Diffstat (limited to 'route/util.go')
-rw-r--r-- | route/util.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/route/util.go b/route/util.go index 9a2de75..defa60e 100644 --- a/route/util.go +++ b/route/util.go @@ -386,4 +386,14 @@ func TemplateFunctions(engine *html.Engine) { return board.Name + "/" + util.ShortURL(board.Outbox, OP) + "#" + util.ShortURL(board.Outbox, link) }) + + engine.AddFunc("showArchive", func(actor activitypub.Actor) bool { + col, err := actor.GetCollectionTypeLimit("Archive", 1) + + if err != nil || len(col.OrderedItems) == 0 { + return false + } + + return true + }) } |