Commit a70721e0 authored by Martin Matějek's avatar Martin Matějek

Simplify notification skeleton initialization

parent 9e4c1e45
...@@ -83,17 +83,10 @@ class PluginStorage: ...@@ -83,17 +83,10 @@ class PluginStorage:
# TODO: refactor/simplify this code # TODO: refactor/simplify this code
notification_args = {} notification_args = {}
notification_args['plugin_name'] = plugin_name notification_args['plugin_name'] = plugin_name
notification_args['actions'] = {
skel_actions = {} action: plugin_actions[action] for action in skeleton['actions'] if action in plugin_actions
for action in skeleton['actions']: }
if action in plugin_actions: notification_args['template'] = templates[skeleton['template']]
skel_actions[action] = plugin_actions[action]
notification_args['actions'] = skel_actions
tmpl_name = skeleton['template']
template = templates[tmpl_name]
notification_args['template'] = template
for attr in self.META_ATTRS: for attr in self.META_ATTRS:
if attr in skeleton: if attr in skeleton:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment