From f7fe30f387333cd2473e0763618e8b4dd5cef293 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Wed, 12 May 2021 22:05:44 +0200 Subject: [PATCH] Add after handling --- pkg/timeline/postgres.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/timeline/postgres.go b/pkg/timeline/postgres.go index 65f371a..46fa137 100644 --- a/pkg/timeline/postgres.go +++ b/pkg/timeline/postgres.go @@ -90,6 +90,12 @@ WHERE "channel_id" = $1 args = append(args, b) qb.WriteString(` AND "published_at" < $2`) } + } else if after != "" { + b, err := time.Parse(time.RFC3339, after) + if err == nil { + args = append(args, b) + qb.WriteString(` AND "published_at" > $2`) + } } qb.WriteString(` ORDER BY "published_at"`)