make it not possible for a post to have "queen" or "sharpened" css class without having the body replacements (through editing above the 1000 mark)
parent
a1b226117b
commit
678faa9e73
|
@ -383,6 +383,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
|
||||||
sanitized = owoify(sanitized)
|
sanitized = owoify(sanitized)
|
||||||
if author.marsify and not author.chud:
|
if author.marsify and not author.chud:
|
||||||
sanitized = marsify(sanitized)
|
sanitized = marsify(sanitized)
|
||||||
|
|
||||||
if obj.sharpened:
|
if obj.sharpened:
|
||||||
sanitized = sharpen(sanitized)
|
sanitized = sharpen(sanitized)
|
||||||
if obj.queened:
|
if obj.queened:
|
||||||
|
@ -681,6 +682,7 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
|
||||||
title = owoify(title)
|
title = owoify(title)
|
||||||
if author.marsify and not author.chud:
|
if author.marsify and not author.chud:
|
||||||
title = marsify(title)
|
title = marsify(title)
|
||||||
|
|
||||||
if obj.sharpened:
|
if obj.sharpened:
|
||||||
title = sharpen(title)
|
title = sharpen(title)
|
||||||
|
|
||||||
|
|
|
@ -551,6 +551,8 @@ def submit_post(v, hole=None):
|
||||||
if url == '': url = None
|
if url == '': url = None
|
||||||
|
|
||||||
flag_chudded = v.chud and hole != 'chudrama' and not (len(body) > 1000 and not v.chudded_by)
|
flag_chudded = v.chud and hole != 'chudrama' and not (len(body) > 1000 and not v.chudded_by)
|
||||||
|
flag_queened = v.queened and len(body) <= 1000
|
||||||
|
flag_sharpened = v.sharpened and len(body) <= 1000
|
||||||
|
|
||||||
p = Post(
|
p = Post(
|
||||||
private=flag_private,
|
private=flag_private,
|
||||||
|
@ -568,8 +570,8 @@ def submit_post(v, hole=None):
|
||||||
ghost=flag_ghost,
|
ghost=flag_ghost,
|
||||||
chudded=flag_chudded,
|
chudded=flag_chudded,
|
||||||
rainbowed=bool(v.rainbow),
|
rainbowed=bool(v.rainbow),
|
||||||
queened=bool(v.queen),
|
queened=flag_queened,
|
||||||
sharpened=bool(v.sharpen),
|
sharpened=flag_sharpened,
|
||||||
)
|
)
|
||||||
|
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue