notifs
This commit is contained in:
parent
4e815a3ad1
commit
1c4abfa77e
2 changed files with 4 additions and 6 deletions
|
@ -133,12 +133,6 @@ def login_post():
|
|||
else:
|
||||
abort(400)
|
||||
|
||||
if account.is_banned and account.unban_utc > 0 and time.time() > account.unban_utc:
|
||||
account.is_banned = 0
|
||||
account.unban_utc = 0
|
||||
account.ban_evade = 0
|
||||
g.db.add(account)
|
||||
|
||||
session["user_id"] = account.id
|
||||
session["session_id"] = token_hex(16)
|
||||
session["login_nonce"] = account.login_nonce
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from files.helpers.wrappers import *
|
||||
from files.helpers.get import *
|
||||
from files.helpers.const import NOTIFICATIONS_ACCOUNT
|
||||
from files.helpers.notifications import send_notification
|
||||
from files.classes import *
|
||||
from flask import *
|
||||
from files.__main__ import app, limiter, cache
|
||||
|
@ -106,10 +108,12 @@ def api_vote_post(post_id, new, v):
|
|||
v.agendaposter_expires_utc = 0
|
||||
v.agendaposter = False
|
||||
g.db.add(v)
|
||||
send_notification(NOTIFICATIONS_ACCOUNT, v, "Your agendaposter theme has expired!")
|
||||
|
||||
if v.flairchanged and v.flairchanged < time.time():
|
||||
v.flairchanged = None
|
||||
g.db.add(v)
|
||||
send_notification(NOTIFICATIONS_ACCOUNT, v, "Your flair lock has expired. You can now change your flair!")
|
||||
|
||||
try:
|
||||
g.db.flush()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue