Discord improvements
TODO:
- [ ] Hide players per IP option completly
- [ ] Prevent rejoin after kick
- [x] Optionally include discord script IF the client has a discord instance cookie
- [ ] We need to forward all the query parameters, otherwise the SDK can't authenticate
Maybe:
- [ ] Automatically associate a randomly joined public lobbies with the activity?
Okay ... so the discord sdk needs all the parameters.
Passing them through as query parameters was too annoying. The Discord SDK was made for SPAs, which scribble.rs isn't.
To solve this we use a modified DiscordSDK and cookies.
HOWEVER ... it seems that this also won't work, as the DiscordSDK relies on messages posted to the iframe, after its blocking scripts have loaded.
This can probably be solved two ways:
A: Load the script in index and save the data we need B: Save the message and replay it.
B would probably be better though, as we can keep using the connection for other stuff in the future.
Meh, I give up on this :D