add .Until filtering to event query.

This commit is contained in:
fiatjaf
2021-12-26 07:10:59 -03:00
parent 30eae726c1
commit b4f94b8fdd
3 changed files with 8 additions and 3 deletions

View File

@@ -67,6 +67,11 @@ func (b *BasicRelay) QueryEvents(
params = append(params, filter.Since)
}
if filter.Until != 0 {
conditions = append(conditions, "created_at < ?")
params = append(params, filter.Until)
}
if len(conditions) == 0 {
// fallback
conditions = append(conditions, "true")