aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authentication/utils.py4
-rw-r--r--templates/watch/watch.html24
2 files changed, 2 insertions, 26 deletions
diff --git a/authentication/utils.py b/authentication/utils.py
index abef14f..3a18541 100644
--- a/authentication/utils.py
+++ b/authentication/utils.py
@@ -41,7 +41,7 @@ def get_redirect_uri():
# Only Authenticated Users who are in our Discord Server can access the website
discord_client_id = os.environ.get("DISCORD_CLIENT_ID")
discord_redirect_uri = os.environ.get("DISCORD_REDIRECT_URI")
- discord_scope = "identify guilds guilds.members.read rpc"
+ discord_scope = "identify guilds guilds.members.read"
redirect_uri = f"https://discord.com/oauth2/authorize?client_id={discord_client_id}&response_type=code&redirect_uri={discord_redirect_uri}&scope={discord_scope}"
return redirect_uri
@@ -111,7 +111,7 @@ def exchange_code(code):
"grant_type": "authorization_code",
"code": code,
"redirect_uri": discord_redirect_uri,
- "scope": "identify guilds guilds.members.read rpc",
+ "scope": "identify guilds guilds.members.read",
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
diff --git a/templates/watch/watch.html b/templates/watch/watch.html
index 93f2ff0..58765ae 100644
--- a/templates/watch/watch.html
+++ b/templates/watch/watch.html
@@ -1466,28 +1466,4 @@
fetch(nextEpisodeUrl.href);
{% endif %}
</script>
-<script>
- function clearDiscordStatus() {
- const url = '{% url "watch:clear_discord_status" %}';
- const data = new FormData();
- data.append('csrfmiddlewaretoken', '{{ csrf_token }}');
-
- if (navigator.sendBeacon) {
- // Use sendBeacon for page unload or tab close
- navigator.sendBeacon(url, data);
- } else {
- // Fallback for fetch if sendBeacon is not available
- fetch(url, {
- method: 'POST',
- body: data,
- });
- }
- }
-
- // Trigger on page unload and navigation events
- window.addEventListener('beforeunload', clearDiscordStatus);
- window.addEventListener('popstate', clearDiscordStatus);
- window.addEventListener('unload', clearDiscordStatus);
-
-</script>
{% endblock scripts %}