Merge pull request #312 from examknow/patch-6

Move highlight prevention before urls
This commit is contained in:
jess 2021-05-31 16:29:42 +01:00 committed by GitHub
commit 7b1ad1e8ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,