unify usage and export nostr.IsOlder() helper.

This commit is contained in:
fiatjaf
2026-01-22 22:54:44 -03:00
parent f1fdb0788a
commit 0cb0d1ccb0
9 changed files with 16 additions and 25 deletions

View File

@@ -56,6 +56,11 @@ func (b *BleveBackend) Init() error {
return nil
}
func (b *BleveBackend) CountEvents(nostr.Filter) (uint32, error) {
func (b *BleveBackend) CountEvents(filter nostr.Filter) (uint32, error) {
if filter.String() == "{}" {
count, err := b.index.DocCount()
return uint32(count), err
}
return 0, errors.New("not supported")
}