From 1c3867135619d30104229fa26e2daa70f0999373 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 7 Aug 2022 19:56:01 -0400 Subject: [PATCH] add SEND_MESSAGES permission check finally --- src/components/chatwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/chatwindow.cpp b/src/components/chatwindow.cpp index f7c3459..58e36d0 100644 --- a/src/components/chatwindow.cpp +++ b/src/components/chatwindow.cpp @@ -222,6 +222,7 @@ Snowflake ChatWindow::GetActiveChannel() const { bool ChatWindow::OnInputSubmit(ChatSubmitParams data) { auto &discord = Abaddon::Get().GetDiscordClient(); + if (!discord.HasSelfChannelPermission(m_active_channel, Permission::SEND_MESSAGES)) return false; int nitro_restriction = BaseAttachmentSizeLimit; const auto nitro = discord.GetUserData().PremiumType;