Integrate ACL with publishers for background event dispatch, ensure proper buffer adjustments in event encoding, and enhance follows sync with event delivery logic.

This commit is contained in:
2025-09-12 16:36:22 +01:00
parent bc1527e6cf
commit 098595717f
3 changed files with 20 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import (
"lol.mleku.dev/chk"
"lol.mleku.dev/log"
"next.orly.dev/app/config"
acl "next.orly.dev/pkg/acl"
database "next.orly.dev/pkg/database"
"next.orly.dev/pkg/encoders/bech32encoding"
"next.orly.dev/pkg/protocol/publish"
@@ -45,6 +46,10 @@ func Run(
publishers: publish.New(NewPublisher(ctx)),
Admins: adminKeys,
}
// provide publisher to ACL so background sync can dispatch events
if err := acl.Registry.Configure(cfg, db, ctx, l.publishers); chk.E(err) {
// if configuration fails, proceed but log; ACL might be 'none'
}
addr := fmt.Sprintf("%s:%d", cfg.Listen, cfg.Port)
log.I.F("starting listener on http://%s", addr)
go func() {