From 0ece2b56e7c032570d1bd211b0b0434d3c2a56be Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Wed, 9 Aug 2017 02:07:13 +0000 Subject: [PATCH] Set default fallback if defaultchannel query parameter is locked for the user --- webapp/titanembeds/static/js/embed.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index d9801f9..53d50a7 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -314,6 +314,9 @@ } for (var i = 0; i < guildchannels.length; i++) { if (guildchannels[i].channel.id == defaultChannel) { + if (!guildchannels[i].read) { + return; + } selected_channel = defaultChannel; return; }