Introduce ACL registry with follows implementation, enhance SaveEvent for replaceable kinds, and refactor filter-based serial fetching. Update configs and dependencies.

This commit is contained in:
2025-09-07 16:13:07 +01:00
parent b6ea3d5181
commit f5a8c094e4
10 changed files with 293 additions and 17 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"strings"
acl "acl.orly"
"encoders.orly/envelopes/eventenvelope"
"encoders.orly/kind"
"lol.mleku.dev/chk"
@@ -69,9 +70,15 @@ func (l *Listener) HandleEvent(msg []byte) (err error) {
}
}
// store the event
log.I.F("saving event %0x, %s", env.E.ID, env.E.Serialize())
if _, _, err = l.SaveEvent(l.Ctx, env.E); chk.E(err) {
return
}
// if a follow list was saved, reconfigure ACLs now that it is persisted
if env.E.Kind == kind.FollowList.K {
if err = acl.Registry.Configure(); chk.E(err) {
}
}
l.publishers.Deliver(env.E)
// Send a success response storing
if err = Ok.Ok(l, env, ""); chk.E(err) {