This commit is contained in:
Aevann1 2022-01-04 15:18:37 +02:00
parent 20cf78883d
commit 75060a0a6e
4 changed files with 9 additions and 14 deletions

View file

@ -29,7 +29,7 @@ def send_repeatable_notification(uid, text, autojanny=False):
for i in re.finditer("<p>@((\w|-){1,25})", text_html):
u = get_user(i.group(1), graceful=True)
if u:
text_html = text_html.replace(f'<p>@{u.username}', f'<p><a href="{u.url2}"><img loading="lazy" src="/uid/{u.id}/pic" class="pp20">@{u.username}</a>')
text_html = text_html.replace(f'<p>@{u.username}', f'<p><a href="/id/{u.id}"><img loading="lazy" src="/uid/{u.id}/pic" class="pp20">@{u.username}</a>')
existing_comment = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, distinguish_level=6, body_html=text_html, created_utc=0).first()
@ -59,7 +59,7 @@ def notif_comment(text, autojanny=False):
for i in re.finditer("<p>@((\w|-){1,25})", text_html):
u = get_user(i.group(1), graceful=True)
if u:
text_html = text_html.replace(f'<p>@{u.username}', f'<p><a href="{user.url2}"><img loading="lazy" src="/uid/{u.id}/pic" class="pp20">@{u.username}</a>')
text_html = text_html.replace(f'<p>@{u.username}', f'<p><a href="/id/{user.id}"><img loading="lazy" src="/uid/{u.id}/pic" class="pp20">@{u.username}</a>')
existing = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, distinguish_level=6, body_html=text_html, created_utc=0).first()