summaryrefslogtreecommitdiff
path: root/src/components/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chatwindow.cpp')
-rw-r--r--src/components/chatwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/chatwindow.cpp b/src/components/chatwindow.cpp
index 58e36d0..c5b4d14 100644
--- a/src/components/chatwindow.cpp
+++ b/src/components/chatwindow.cpp
@@ -223,6 +223,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;
+ if (!data.Attachments.empty() && !discord.HasSelfChannelPermission(m_active_channel, Permission::ATTACH_FILES)) return false;
int nitro_restriction = BaseAttachmentSizeLimit;
const auto nitro = discord.GetUserData().PremiumType;