From be5c5e6c21ff26939c163da98022d14b2c4a898a Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 18 Jan 2019 08:18:47 +0000 Subject: Allow non-category items to be placed in a channel's event categories, allowing users to specify specific events (github.py) --- modules/github.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/github.py') diff --git a/modules/github.py b/modules/github.py index c14126f7..bbb8b4e6 100644 --- a/modules/github.py +++ b/modules/github.py @@ -190,8 +190,11 @@ class Module(ModuleManager.BaseModule): event_categories = channel.get_setting( "github-events", DEFAULT_EVENT_CATEGORIES) - github_events = list(itertools.chain( - *[EVENT_CATEGORIES[c] for c in event_categories])) + + github_events = [] + for category in event_categories: + github_events.append(EVENT_CATEGORIES.get(c, [c])) + github_events = list(itertools.chain(*github_events)) if (github_event in github_events or (event_action and event_action in github_events)): -- cgit v1.3.1-10-gc9f91