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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user