Publish Discord inbound replies on the post event bus (#19)
CI / test (push) Successful in 6m26s

Inbound publishes PostCreated after saving the Discord link. Outbound skips already-linked posts so the bot does not echo. Mail uses the existing subscriber.

Reviewed-on: #19
Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #19.
This commit is contained in:
2026-08-31 04:27:11 +00:00
committed by codegirl007
parent a1b0351048
commit e68afba6a5
5 changed files with 66 additions and 55 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ func main() {
}
bus := events.New()
mail.Subscribe(bus, store.NewPostgres(db), notifier)
bot, err := discord.FromEnv(store.NewDiscordLinks(db), bus, store.NewPostgres(db), notifier)
bot, err := discord.FromEnv(store.NewDiscordLinks(db), bus, store.NewPostgres(db))
if err != nil {
log.Fatalf("discord: %v", err)
}