check / check (push) Successful in 2m3s
Each message a contact sends in a direct chat is posted to each webhook registered on that chat: `POST`, `Content-Type: application/json`, body `{"chat_id":N,"message":{...}}` with the same record the messages endpoint returns. The event handler only queues the message; four goroutines post it, one attempt each with a 10-second timeout and no retries, and with 100 already waiting a message is dropped and logged, so a slow webhook never delays the bot's replies. Posting stops last, after the chat client.
Disclosures: redirects are not followed; a logged failure can name the webhook's host but never its path, query or credentials; posts still in flight at shutdown are abandoned and logged.
Model: opus-5-5
10 lines
245 B
Go
10 lines
245 B
Go
package api
|
|
|
|
// DeliveryGoroutines and QueueLength are deliveryGoroutines and
|
|
// queueLength, exported for the external test package, which fills the
|
|
// queue.
|
|
const (
|
|
DeliveryGoroutines = deliveryGoroutines
|
|
QueueLength = queueLength
|
|
)
|