Skip to content

before_store

before_store(items, ctx) is your last chance to drop items before dedup + insert. Return nil to skip storing and notifying.

function before_store(items, ctx) -> table | nil
Field Type Description
items array Array of item tables ({ fields = { ... }, matches = { ... } })
Return Effect
Array of items Continue with store + notify
nil / false Skip store and notify entirely
function before_store(items, ctx)
-- Only store during business hours
local hour = os.date("*t").hour
if hour < 9 or hour > 17 then
return nil -- don't store, don't notify
end
return items
end