diff options
author | FChannel <> | 2022-06-04 15:12:24 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 0b97866be3a15f64170673af9813b39cbc585db5 (patch) | |
tree | 0949491e1ccccb9d3861db2553c72a4794591903 /route/util.go | |
parent | 60752f58ab0eade30e88c1e98ad530a4b151586e (diff) |
archive page works
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 + }) } |