notify
notify(title, body, [timeout_ms]) sends a desktop notification immediately. Thin wrapper around SpyWeb’s native notification sender, usable from any hook including error paths.
Signature
Section titled “Signature”notify(title, body, [timeout_ms])
asyncParameters
Section titled “Parameters”| Param | Type | Description |
|---|---|---|
title |
string | Notification title |
body |
string | Notification body text |
timeout_ms |
number? | Optional timeout in milliseconds (default: 5000) |
Returns
Section titled “Returns”None.
Example
Section titled “Example”function after_fetch(fetch_result, ctx) if not fetch_result.ok then notify("Network error", fetch_result.error.message, 10000) return nil end return fetch_resultendSee Also
Section titled “See Also”- log - Append to hooks.log file