ruled.notification: Handle legacy presets.
This is deprecated, but some modules like `lain` use them, so it must still minimally work for backward compatibility.
This commit is contained in:
parent
e752943b98
commit
9336b62f80
|
@ -160,6 +160,15 @@ end
|
|||
-- @staticfct ruled.notification.apply
|
||||
function module.apply(n)
|
||||
local callbacks, props = {}, {}
|
||||
|
||||
if n.preset then
|
||||
for k, v in pairs(n.preset) do
|
||||
if not n._private[v] then
|
||||
props[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in ipairs(nrules._matching_source) do
|
||||
v.callback(nrules, n, props, callbacks)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue