Skip to content

Commit

Permalink
filter out inaccessible channels
Browse files Browse the repository at this point in the history
  • Loading branch information
ouwou committed Jun 5, 2024
1 parent 3c8401b commit 90bc9f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dialogs/quickswitcher/quickswitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ void QuickSwitcher::IndexChannels() {
const auto channels = discord.GetAllChannelData();
for (auto &channel : channels) {
if (!channel.Name.has_value()) continue;
if (!channel.IsText()) continue;
// might want to optimize this at some point
if (!discord.HasSelfChannelPermission(channel.ID, Permission::VIEW_CHANNEL)) continue;
m_index[channel.ID] = { SwitcherEntry::ResultType::Channel,
*channel.Name,
static_cast<uint64_t>(channel.ID),
Expand Down

0 comments on commit 90bc9f9

Please sign in to comment.