notify: no need to include dashes in token

This commit is contained in:
eyjhb 2025-03-12 00:03:15 +01:00
parent 09b3d1510b
commit 5564c8cbfc
Signed by: eyjhb
GPG key ID: 609F508E3239F920

View file

@ -291,7 +291,8 @@ def send_notification():
con = get_db()
cur = con.cursor()
res = cur.execute(
"SELECT username FROM tokens WHERE token = ?", (token,)
"SELECT username FROM tokens WHERE REPLACE(token, '-', '') = ? OR token = ? ",
(token, token),
).fetchone()
if not res: