well-goknown/vendor/github.com/fiatjaf/eventstore/helpers.go

11 lines
227 B
Go
Raw Permalink Normal View History

package eventstore
import (
"github.com/nbd-wtf/go-nostr"
)
func isOlder(previous, next *nostr.Event) bool {
return previous.CreatedAt < next.CreatedAt ||
(previous.CreatedAt == next.CreatedAt && previous.ID > next.ID)
}