made it so ALL comments on ghosted posts are ghosted too, this includes the hidden poll comments

that way, the poll voters will be hidden and we can have anonymous polls

context: https://rdrama.net/votes?link=t3_2007526
master
Aevann1 2022-05-30 05:26:52 +02:00
parent 27d81f6506
commit e5dbc9bfdd
2 changed files with 25 additions and 15 deletions

View File

@ -413,7 +413,8 @@ def api_comment(v):
level=level+1,
body_html=filter_emojis_only(option),
upvotes=0,
is_bot=True
is_bot=True,
ghost=c.ghost
)
g.db.add(c_option)
@ -425,7 +426,8 @@ def api_comment(v):
level=level+1,
body_html=filter_emojis_only(choice),
upvotes=0,
is_bot=True
is_bot=True,
ghost=c.ghost
)
g.db.add(c_choice)
@ -454,7 +456,7 @@ def api_comment(v):
is_bot=True,
body_html=body_based_html,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost
ghost=c.ghost
)
g.db.add(c_based)
@ -486,7 +488,7 @@ def api_comment(v):
is_bot=True,
body_html=body_jannied_html,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost
ghost=c.ghost
)
g.db.add(c_jannied)
@ -522,7 +524,7 @@ def api_comment(v):
is_bot=True,
body_html=body_html2,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost
ghost=c.ghost
)
g.db.add(c2)
@ -553,7 +555,7 @@ def api_comment(v):
is_bot=True,
body_html=body_html2,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost,
ghost=c.ghost,
distinguish_level=6
)
@ -578,7 +580,7 @@ def api_comment(v):
is_bot=True,
body_html=body_html2,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost,
ghost=c.ghost,
distinguish_level=6
)
@ -596,7 +598,7 @@ def api_comment(v):
is_bot=True,
body_html=body_html2,
top_comment_id=c.top_comment_id,
ghost=parent_post.ghost,
ghost=c.ghost,
distinguish_level=6
)
@ -708,7 +710,8 @@ def edit_comment(cid, v):
level=c.level+1,
body_html=filter_emojis_only(i.group(1)),
upvotes=0,
is_bot=True
is_bot=True,
ghost=c.ghost
)
g.db.add(c_option)
@ -720,7 +723,8 @@ def edit_comment(cid, v):
level=c.level+1,
body_html=filter_emojis_only(i.group(1)),
upvotes=0,
is_bot=True
is_bot=True,
ghost=c.ghost
)
g.db.add(c_choice)

View File

@ -483,7 +483,8 @@ def edit_post(pid, v):
level=1,
body_html=filter_emojis_only(i.group(1)),
upvotes=0,
is_bot=True
is_bot=True,
ghost=p.ghost
)
g.db.add(c)
@ -494,7 +495,8 @@ def edit_post(pid, v):
level=1,
body_html=filter_emojis_only(i.group(1)),
upvotes=0,
is_bot=True
is_bot=True,
ghost=p.ghost
)
g.db.add(c)
@ -1138,7 +1140,8 @@ def submit_post(v, sub=None):
level=1,
body_html=filter_emojis_only(option),
upvotes=0,
is_bot=True
is_bot=True,
ghost=post.ghost
)
g.db.add(c)
@ -1148,7 +1151,8 @@ def submit_post(v, sub=None):
level=1,
body_html=filter_emojis_only(choice),
upvotes=0,
is_bot=True
is_bot=True,
ghost=post.ghost
)
g.db.add(c)
@ -1227,6 +1231,7 @@ def submit_post(v, sub=None):
stickied='AutoJanny',
distinguish_level=6,
body_html=body_jannied_html,
ghost=post.ghost
)
g.db.add(c_jannied)
@ -1329,7 +1334,8 @@ def submit_post(v, sub=None):
over_18=False,
is_bot=True,
app_id=None,
body_html=body_html
body_html=body_html,
ghost=post.ghost
)
g.db.add(c)