xvc
This commit is contained in:
parent
bc0909e8dc
commit
5d47158e5f
3 changed files with 17 additions and 16 deletions
File diff suppressed because one or more lines are too long
|
@ -225,7 +225,7 @@ def sign_up_get(v):
|
||||||
|
|
||||||
|
|
||||||
@app.post("/signup")
|
@app.post("/signup")
|
||||||
@limiter.limit("1/minute;5/day")
|
@limiter.limit("5/day")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def sign_up_post(v):
|
def sign_up_post(v):
|
||||||
with open('disable_signups', 'r') as f:
|
with open('disable_signups', 'r') as f:
|
||||||
|
|
|
@ -766,7 +766,7 @@ def thumbnail_thread(pid):
|
||||||
|
|
||||||
body_html = sanitize(f'New {word} mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
body_html = sanitize(f'New {word} mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
||||||
|
|
||||||
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html, level=1, sentto=2).one_or_none()
|
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html, level=1).one_or_none()
|
||||||
|
|
||||||
if existing_comment: break
|
if existing_comment: break
|
||||||
|
|
||||||
|
@ -775,7 +775,6 @@ def thumbnail_thread(pid):
|
||||||
distinguish_level=6,
|
distinguish_level=6,
|
||||||
body_html=body_html,
|
body_html=body_html,
|
||||||
level=1,
|
level=1,
|
||||||
sentto=0,
|
|
||||||
)
|
)
|
||||||
db.add(new_comment)
|
db.add(new_comment)
|
||||||
db.flush()
|
db.flush()
|
||||||
|
@ -817,7 +816,7 @@ def thumbnail_thread(pid):
|
||||||
for i in data:
|
for i in data:
|
||||||
body_html = sanitize(f'New pcmemes mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
body_html = sanitize(f'New pcmemes mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
||||||
|
|
||||||
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html, level=1, sentto=2).one_or_none()
|
existing_comment = db.query(Comment.id).filter_by(author_id=NOTIFICATIONS_ID, parent_submission=None, distinguish_level=6, body_html=body_html, level=1).one_or_none()
|
||||||
|
|
||||||
if existing_comment: break
|
if existing_comment: break
|
||||||
|
|
||||||
|
@ -825,8 +824,7 @@ def thumbnail_thread(pid):
|
||||||
parent_submission=None,
|
parent_submission=None,
|
||||||
distinguish_level=6,
|
distinguish_level=6,
|
||||||
body_html=body_html,
|
body_html=body_html,
|
||||||
level=1,
|
level=1
|
||||||
sentto=2,
|
|
||||||
)
|
)
|
||||||
db.add(new_comment)
|
db.add(new_comment)
|
||||||
db.flush()
|
db.flush()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue