Generalize post reply notifications (#6)
## Summary - Notify the direct parent post author for replies throughout nested conversations - Skip root creation, self-replies, edits, disabled mail, and recipients without email - Link directly to each reply and use per-reply Resend idempotency Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
@@ -510,6 +510,7 @@ func (s *Server) handleAnswer(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "could not save answer", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
s.notifyPostReply(root, root, reply, u)
|
||||
location := "/questions/" + url.PathEscape(id) + "#post-" + url.PathEscape(reply.ID)
|
||||
if isHTMX(r) {
|
||||
w.Header().Set("HX-Redirect", location)
|
||||
|
||||
Reference in New Issue
Block a user