forked from rDrama/rDrama
1
0
Fork 0

add !YOU! to post bodies and to comments

master
Aevann1 2022-11-27 03:31:46 +02:00
parent 36f6b89a1a
commit 1f4fc16d44
2 changed files with 13 additions and 0 deletions

View File

@ -294,6 +294,9 @@ class Comment(Base):
if not self.ghost and self.author.show_sig(v):
body += f"<hr>{self.author.sig_html}"
if v:
body = body.replace("!YOU!", v.username)
return body
@lazy
@ -309,6 +312,9 @@ class Comment(Base):
body = censor_slurs(body, v).replace('<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" title=":marseytrain:" src="/e/marseytrain.webp">', ':marseytrain:')
if v:
body = body.replace("!YOU!", v.username)
return body
@lazy

View File

@ -324,6 +324,9 @@ class Submission(Base):
if not listing and not self.ghost and self.author.show_sig(v):
body += f"<hr>{self.author.sig_html}"
if v:
body = body.replace("!YOU!", v.username)
return body
@lazy
@ -337,6 +340,10 @@ class Submission(Base):
body = censor_slurs(body, v).replace('<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" title=":marseytrain:" src="/e/marseytrain.webp">', ':marseytrain:')
body = normalize_urls_runtime(body, v)
if v:
body = body.replace("!YOU!", v.username)
return body
@lazy