Nimuedaertya / reallife-quest-murder-game

reallife-quest-murder-game
MIT License
3 stars 1 forks source link

Notifications for Reports #15

Open Limiria opened 2 months ago

Limiria commented 2 months ago

Instead of screaming and not Knowning if everybody heard it, it would be cool to have Notifications send to the players is someone want to report a dead body. So the solution I have seen so far is to use Websocket, but I'm not completely sure how flask can deal with that.

Limiria commented 2 months ago

On the notifications branch is now a version where all players on the players infopage will get a notification if someone presses the report button. It's to mention that I only have tested this feature on one device with 2 different tabs in Firefox and one Opera tab. I would test it again on mobile devices, because I don't know exactly how they would behave in this case.

Limiria commented 2 months ago

So we tested this and the devices receive a message, but only in the moment when they are connected to the local network. So if someone is out of range, they won't receive a message, what is a problem for this feature. Another big problem is that permission for notification on "not secure context" will not even shown and so neither the notifications: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts

These are to problems that could be solved with not hosting the website with flask in a local network, but with https on a sever so you can access it from everywhere. Screenshot from 2024-04-20 23-01-06

Limiria commented 2 months ago

So actually I have now tried to establish a secure context in flask, with the first part of this site: https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https Maybe this could work now