before_store
before_store(items, ctx) is your last chance to drop items before dedup + insert. Return nil to skip storing and notifying.
Signature
Section titled “Signature”function before_store(items, ctx) -> table | nilParameters
Section titled “Parameters”| Field | Type | Description |
|---|---|---|
items |
array | Array of item tables ({ fields = { ... }, matches = { ... } }) |
Returns
Section titled “Returns”| Return | Effect |
|---|---|
| Array of items | Continue with store + notify |
nil / false |
Skip store and notify entirely |
Example
Section titled “Example”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 itemsendSee Also
Section titled “See Also”- filter_item - Per-item filter before store
- before_notify - Modify items before notification