From 0b97866be3a15f64170673af9813b39cbc585db5 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 4 Jun 2022 15:12:24 -0700 Subject: archive page works --- route/util.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'route/util.go') 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 + }) } -- cgit v1.2.3