diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py index 6f3e78de04..7c743d4e46 100644 --- a/files/helpers/alerts.py +++ b/files/helpers/alerts.py @@ -102,9 +102,10 @@ def NOTIFY_USERS(text, v): if word in text.lower() and id not in notify_users and v.id != id: notify_users.add(id) soup = BeautifulSoup(text, features="html.parser") - for mention in soup.find_all("a", href=re.compile("^/@(\w+)")): - username = mention["href"].split("@")[1] - user = g.db.query(User).filter_by(username=username).one_or_none() - if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) + for mention in soup.find_all("a", href=re.compile("^\/id\/([0-9]+)")): + id = mention["href"].split("/id/")[1] + if id != v.id: + user = g.db.query(User).filter_by(id=id).one_or_none() + if user and not v.any_block_exists(user): notify_users.add(user.id) return notify_users \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index f817cc1e6a..efa09c8d5c 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -518,31 +518,7 @@ {% if render_replies %} - {% if level<10 %} -