hide post title for the 3 restricted holes

pull/83/head
Aevann 2023-01-01 05:50:29 +02:00
parent 661646f134
commit 2d2a3520b3
1 changed files with 4 additions and 3 deletions

View File

@ -112,9 +112,10 @@ class Submission(Base):
link = f"/post/{self.id}"
if self.sub: link = f"/h/{self.sub}{link}"
output = title_regex.sub('', self.title.lower())
output = output.split()[:6]
output = '-'.join(output)
if self.sub and self.sub not in {'chudrama', 'countryclub', 'masterbaiters'}:
output = title_regex.sub('', self.title.lower())
output = output.split()[:6]
output = '-'.join(output)
if not output: output = '-'