aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-19 18:58:29 +0100
committerGravatar jesopo2019-10-19 18:58:29 +0100
commitae549575e4de3cd43814323ebc3d927d6b2a5d49 (patch)
treee0a87d0fefe185fcf663aebab03ffd4b488638ae
parentdont shorten git webhook urls by default (diff)
signature
still show url when shortening is turned off
-rw-r--r--modules/git_webhooks/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py
index bdce810f..fb0899c6 100644
--- a/modules/git_webhooks/__init__.py
+++ b/modules/git_webhooks/__init__.py
@@ -124,10 +124,11 @@ class Module(ModuleManager.BaseModule):
output = "(%s) %s" % (
utils.irc.color(source, colors.COLOR_REPO), output)
- if url and channel.get_setting("git-shorten-urls", False):
- shorturl = self.exports.get_one("shorturl")(server, url,
- context=channel) or url
- output = "%s - %s" % (output, shorturl)
+ if url:
+ if channel.get_setting("git-shorten-urls", False):
+ url = self.exports.get_one("shorturl")(server, url,
+ context=channel) or url
+ output = "%s - %s" % (output, url)
if channel.get_setting("git-prevent-highlight", False):
output = self._prevent_highlight(server, channel,