From ab0b3be74126651ba1246f0805b006534523c879 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 1 Mar 2019 22:21:07 +0000 Subject: `event` doesn't have a `"channel"` in an API hook --- modules/github/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'modules/github/__init__.py') diff --git a/modules/github/__init__.py b/modules/github/__init__.py index 61e759f9..c36f230b 100644 --- a/modules/github/__init__.py +++ b/modules/github/__init__.py @@ -368,14 +368,15 @@ class Module(ModuleManager.BaseModule): elif github_event == "watch": outputs = self.watch(data) - source = full_name or organisation - hide_org = event["channel"].get_setting("github-hide-organisation", - False) - if repo_name and hide_org: - source = repo_name if outputs: for server, channel in targets: + source = full_name or organisation + hide_org = channel.get_setting( + "github-hide-organisation", False) + if repo_name and hide_org: + source = repo_name + for output in outputs: output = "(%s) %s" % ( utils.irc.color(source, COLOR_REPO), output) -- cgit v1.3.1-10-gc9f91