From e5e94501ebd55dab801d661abdbc5c6bcbd90cb5 Mon Sep 17 00:00:00 2001 From: David Schultz Date: Sun, 9 May 2021 17:23:50 -0500 Subject: [PATCH] move highlight prevention before urls --- modules/git_webhooks/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index 776c0212..8b44e198 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -135,6 +135,10 @@ class Module(ModuleManager.BaseModule): for output, url in outputs: output = "(%s) %s" % ( utils.irc.color(source, colors.COLOR_REPO), output) + + if channel.get_setting("git-prevent-highlight", False): + output = self._prevent_highlight(server, channel, + output) if url: if channel.get_setting("git-shorten-urls", False): @@ -142,10 +146,6 @@ class Module(ModuleManager.BaseModule): context=channel) or url output = "%s - %s" % (output, url) - if channel.get_setting("git-prevent-highlight", False): - output = self._prevent_highlight(server, channel, - output) - hide_prefix = channel.get_setting("git-hide-prefix", False) self.events.on("send.stdout").call(target=channel, module_name=webhook_name, server=server, message=output,