Skip to content

before_notify

before_notify(items, ctx) runs after items are saved to the DB. It receives only the new items that passed deduplication. Use this to silence “noisy” desktop alerts without affecting webhooks.

function before_notify(items, ctx) -> table | nil
Field Type Description
items array Array of new items (same shape as filter_item input)
Return Effect
Array of items Continue with notification
nil / false Silence desktop notification
function before_notify(items, ctx)
-- Silence notifications if fewer than 3 new items
if #items < 3 then return nil end
-- Only notify for the first 5 items
local capped = {}
for i = 1, math.min(#items, 5) do
capped[i] = items[i]
end
return capped
end