dfdf
This commit is contained in:
parent
d729810e2d
commit
d6f0eca9ee
2 changed files with 5 additions and 5 deletions
|
@ -336,7 +336,7 @@ def sign_up_post(v):
|
|||
email=email,
|
||||
created_utc=int(time.time()),
|
||||
referred_by=ref_id or None,
|
||||
ban_evade = int(any([x.is_banned for x in g.db.query(User).filter(User.id.in_(tuple(session.get("history", [])))).all() if x])),
|
||||
ban_evade = int(any([x.is_banned and not x.unban_utc for x in g.db.query(User).filter(User.id.in_(tuple(session.get("history", [])))).all() if x])),
|
||||
agendaposter = any([x.agendaposter for x in g.db.query(User).filter(User.id.in_(tuple(session.get("history", [])))).all() if x])
|
||||
)
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ def messagereply(v, username, id):
|
|||
Comment.sentto == user.id,
|
||||
CommentAux.body == message,
|
||||
).options(contains_eager(Comment.comment_aux)).first()
|
||||
if existing: return redirect('/notifications?all=true')
|
||||
if existing: return redirect('/notifications?messages=true')
|
||||
|
||||
with CustomRenderer() as renderer: text_html = renderer.render(mistletoe.Document(message))
|
||||
text_html = sanitize(text_html, linkgen=True)
|
||||
|
@ -130,7 +130,7 @@ def messagereply(v, username, id):
|
|||
g.db.add(new_aux)
|
||||
notif = Notification(comment_id=new_comment.id, user_id=user.id)
|
||||
g.db.add(notif)
|
||||
return redirect('/notifications?all=true')
|
||||
return redirect('/notifications?messages=true')
|
||||
|
||||
@app.get("/songs/<id>")
|
||||
def songs(id):
|
||||
|
@ -173,7 +173,7 @@ def message2(v, username):
|
|||
Comment.sentto == user.id,
|
||||
CommentAux.body == message,
|
||||
).options(contains_eager(Comment.comment_aux)).first()
|
||||
if existing: return redirect('/notifications?all=true')
|
||||
if existing: return redirect('/notifications?messages=true')
|
||||
|
||||
send_pm(v.id, user, message)
|
||||
|
||||
|
@ -193,7 +193,7 @@ def message2(v, username):
|
|||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
return redirect('/notifications?all=true')
|
||||
return redirect('/notifications?messages=true')
|
||||
|
||||
@app.get("/2faqr/<secret>")
|
||||
@auth_required
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue