Add an in-process post event bus (#13)
CI / test (push) Successful in 6m16s

Handlers emit PostCreated and PostUpdated after a successful write. Store writes do not publish, and hidden roots are skipped.

Reviewed-on: #13
Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #13.
This commit is contained in:
2026-08-29 18:24:13 +00:00
committed by codegirl007
parent 19fea892f3
commit 911355ae35
10 changed files with 600 additions and 2 deletions
+2
View File
@@ -85,6 +85,7 @@ func (s *Server) handleCreatePost(w http.ResponseWriter, r *http.Request) {
if parent != nil {
s.notifyPostReply(parent, root, post, user)
}
s.publishPostCreated(post, root, user)
http.Redirect(
w,
r,
@@ -190,6 +191,7 @@ func (s *Server) handleEditPost(w http.ResponseWriter, r *http.Request) {
http.Error(w, "could not save post", http.StatusInternalServerError)
return
}
s.publishPostUpdated(post, root, nil)
http.Redirect(
w,
r,