Use is-ignored export in title.py to ignore users for auto-title
This commit is contained in:
parent
a5f8bb7d3d
commit
437418d006
1 changed files with 5 additions and 0 deletions
|
@ -40,6 +40,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
def channel_message(self, event):
|
def channel_message(self, event):
|
||||||
match = re.search(utils.http.REGEX_URL, event["message"])
|
match = re.search(utils.http.REGEX_URL, event["message"])
|
||||||
if match and event["channel"].get_setting("auto-title", False):
|
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)
|
url = match.group(0)
|
||||||
title = self._get_title(match.group(0))
|
title = self._get_title(match.group(0))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue