feat(channels): webhook answers 429 on rate limit; email carries its sender id

This commit is contained in:
sam committed 2026-10-04 17:18:47 +11:00
1 parent b7c821ea7a
commit 87e950bb5b
3 files changed
+36 -8

No files matched your search

+5
View File
@@ -101,6 +101,11 @@ func handler(path, template, deliverTo, secret string, chat gatewayv1.ChatServic
http.Error(w, "route error", http.StatusInternalServerError)
return
}
// A rate-limited delivery answers 429 so the source retries.
if reply.GetRateLimited() {
http.Error(w, "rate limited", http.StatusTooManyRequests)
return
}
if deliverTo == "origin" && reply.GetText() != "" {
w.Header().Set("Content-Type", "text/plain")
_, _ = w.Write([]byte(reply.GetText()))