Merge branch 'frost' into feature-award-feature-flag
This commit is contained in:
commit
84e5c7c651
32 changed files with 248 additions and 526 deletions
|
@ -346,8 +346,8 @@ class Submission(Base):
|
|||
url = self.url.replace("old.reddit.com", v.reddit)
|
||||
|
||||
if '/comments/' in url and "sort=" not in url:
|
||||
if "?" in url: url += "&context=9"
|
||||
else: url += "?context=8"
|
||||
if "?" in url: url += f"&context={RENDER_DEPTH_LIMIT}"
|
||||
else: url += f"?context={RENDER_DEPTH_LIMIT - 1}"
|
||||
if v.controversial: url += "&sort=controversial"
|
||||
return url
|
||||
elif self.url:
|
||||
|
@ -382,22 +382,13 @@ class Submission(Base):
|
|||
|
||||
def plainbody(self, v):
|
||||
if self.club and not (v and (v.paid_dues or v.id == self.author_id)): return f"<p>{CC} ONLY</p>"
|
||||
|
||||
body = self.body
|
||||
|
||||
if not body: return ""
|
||||
|
||||
if v:
|
||||
body = body.replace("old.reddit.com", v.reddit)
|
||||
|
||||
if v.nitter and '/i/' not in body and '/retweets' not in body: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
||||
|
||||
return body
|
||||
|
||||
def print(self):
|
||||
print(f'post: {self.id}, author: {self.author_id}', flush=True)
|
||||
return ''
|
||||
|
||||
@lazy
|
||||
def realtitle(self, v):
|
||||
if self.title_html:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue