implement auth and a simple admin-follows whitelist
Some checks failed
Go / build (push) Has been cancelled

This commit is contained in:
2025-09-07 19:08:29 +01:00
parent f5a8c094e4
commit 5edb7a3b09
27 changed files with 458 additions and 117 deletions

View File

@@ -72,13 +72,16 @@ func (d *D) SaveEvent(c context.Context, ev *event.E) (kc, vc int, err error) {
}
} else if kind.IsParameterizedReplaceable(ev.Kind) {
// find the events and delete them
dTag := ev.Tags.GetFirst([]byte("d"))
if dTag == nil {
err = errorf.E("event is missing a d tag identifier")
return
}
f := &filter.F{
Authors: tag.NewFromBytesSlice(ev.Pubkey),
Kinds: kind.NewS(kind.New(ev.Kind)),
Tags: tag.NewS(
tag.NewFromAny(
"d", ev.Tags.GetFirst([]byte("d")),
),
tag.NewFromAny("d", dTag.Value()),
),
}
var sers types.Uint40s