fix push notifications

remotes/1693045480750635534/spooky-22
Aevann1 2022-06-11 00:14:03 +02:00
parent bceb87d58c
commit 964318fe5d
2 changed files with 4 additions and 3 deletions

View File

@ -351,9 +351,10 @@ def formatting(v):
return render_template("formatting.html", v=v)
@app.get("/worker.js")
@app.get("/service-worker.js")
def serviceworker():
with open("files/assets/js/worker.js", "r", encoding="utf-8") as f: return Response(f.read(), mimetype='application/javascript')
with open("files/assets/js/service-worker.js", "r", encoding="utf-8") as f:
return Response(f.read(), mimetype='application/javascript')
@app.get("/settings/security")
@auth_required

View File

@ -203,7 +203,7 @@
{% if PUSHER_ID != 'blahblahblah' and v %}
<div class="d-none" id="strid">{{request.host}}{{v.id}}</div>
<div class="d-none" id="pusherid">{{PUSHER_ID}}</div>
<script src="/assets/js/pusher.js?v=243"></script>
<script src="/assets/js/pusher.js?v=244"></script>
<script>
if (typeof Android != 'undefined') {
Android.Subscribe('{{request.host}}{{v.id}}');