forked from rDrama/rDrama
1
0
Fork 0

rename is_effortpost to is_longpost

master
Aevann 2024-02-06 21:39:52 +02:00
parent f5ccf5c693
commit 4a0691bfc9
5 changed files with 10 additions and 10 deletions

View File

@ -514,7 +514,7 @@ class Comment(Base):
@property @property
@lazy @lazy
def is_effortpost(self): def is_longpost(self):
return len(self.body) >= 2000 return len(self.body) >= 2000
def pin_parents(self): def pin_parents(self):

View File

@ -395,5 +395,5 @@ class Post(Base):
@property @property
@lazy @lazy
def is_effortpost(self): def is_longpost(self):
return len(self.body) >= 2000 return len(self.body) >= 2000

View File

@ -395,7 +395,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
if blackjack and execute_blackjack(v, None, sanitized, blackjack): if blackjack and execute_blackjack(v, None, sanitized, blackjack):
return '<p>g</p>' return '<p>g</p>'
if obj and not obj.is_effortpost: if obj and not obj.is_longpost:
if author.owoify: if author.owoify:
sanitized = owoify(sanitized, author.chud_phrase) sanitized = owoify(sanitized, author.chud_phrase)
if author.marsify: if author.marsify:
@ -702,7 +702,7 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
title = remove_cuniform(title) title = remove_cuniform(title)
if obj and not obj.is_effortpost: if obj and not obj.is_longpost:
if author.owoify: if author.owoify:
title = owoify(title, author.chud_phrase) title = owoify(title, author.chud_phrase)
if author.marsify: if author.marsify:

View File

@ -261,7 +261,7 @@ def award_thing(v, thing_type, id):
link = f"[this {thing_type}]({obj.shortlink})" link = f"[this {thing_type}]({obj.shortlink})"
can_alter_body = not obj.is_effortpost and (not obj.author.deflector or v == obj.author) can_alter_body = not obj.is_longpost and (not obj.author.deflector or v == obj.author)
if kind == "ban": if kind == "ban":
link = f"/{thing_type}/{obj.id}" link = f"/{thing_type}/{obj.id}"
@ -555,7 +555,7 @@ def award_thing(v, thing_type, id):
if v.id == author.id: if v.id == author.id:
session['event_music'] = False session['event_music'] = False
elif kind in {"ectoplasm", "candycorn", "candycane", "stab", "tilt"}: elif kind in {"ectoplasm", "candycorn", "candycane", "stab", "tilt"}:
if obj.is_effortpost: if obj.is_longpost:
abort(403, f'Effortposts are protected from the {award_title} award!') abort(403, f'Effortposts are protected from the {award_title} award!')
elif kind == "gold": elif kind == "gold":
if obj.award_count('glowie', v): if obj.award_count('glowie', v):

View File

@ -569,10 +569,10 @@ def submit_post(v, hole=None):
) )
p.chudded = v.chud and hole != 'chudrama' and not (p.is_effortpost and not v.chudded_by) p.chudded = v.chud and hole != 'chudrama' and not (p.is_longpost and not v.chudded_by)
p.queened = v.queen and not p.is_effortpost p.queened = v.queen and not p.is_longpost
p.sharpened = v.sharpen and not p.is_effortpost p.sharpened = v.sharpen and not p.is_longpost
p.rainbowed = v.rainbow and not p.is_effortpost p.rainbowed = v.rainbow and not p.is_longpost
title_html = filter_emojis_only(title, count_emojis=True, obj=p, author=v) title_html = filter_emojis_only(title, count_emojis=True, obj=p, author=v)