Use is-ignored export in title.py to ignore users for auto-title

This commit is contained in:
jesopo 2019-04-27 14:55:48 +01:00
parent a5f8bb7d3d
commit 437418d006

View file

@ -40,6 +40,11 @@ class Module(ModuleManager.BaseModule):
def channel_message(self, event):
match = re.search(utils.http.REGEX_URL, event["message"])
if match and event["channel"].get_setting("auto-title", False):
is_ignored_f = short_url = self.exports.get_one("is-ignored",
lambda _1, _2: False)
if is_ignored_f(event["user"], "title"):
return
url = match.group(0)
title = self._get_title(match.group(0))