summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-04-28 20:33:06 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-04-28 20:33:06 -0400
commit3421f463206bebee8321437048a6dc5f47333279 (patch)
treeca937d51e31a3ad9f380ab3901af5cc520b9e5de /components
parent87e23ec583e62c0ae9396981d25803e90191645e (diff)
downloadabaddon-portaudio-3421f463206bebee8321437048a6dc5f47333279.tar.gz
abaddon-portaudio-3421f463206bebee8321437048a6dc5f47333279.zip
emoji completion respects USE_EXTERNAL_EMOJIS
Diffstat (limited to 'components')
-rw-r--r--components/completer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/completer.cpp b/components/completer.cpp
index 4108331..3d1a4d0 100644
--- a/components/completer.cpp
+++ b/components/completer.cpp
@@ -160,8 +160,11 @@ void Completer::CompleteEmojis(const Glib::ustring &term) {
return entry;
};
+ const auto self_id = discord.GetUserData().ID;
+ const bool can_use_external = discord.GetSelfPremiumType() != EPremiumType::None && discord.HasChannelPermission(self_id, channel_id, Permission::USE_EXTERNAL_EMOJIS);
+
int i = 0;
- if (discord.GetSelfPremiumType() == EPremiumType::None) {
+ if (!can_use_external) {
if (channel->GuildID.has_value()) {
const auto guild = discord.GetGuild(*channel->GuildID);