diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-05-11 20:39:18 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-05-11 20:39:18 -0400 |
commit | 8890f5a07111283f9eb0407890cd367a4127fa7b (patch) | |
tree | 261e9b4b0504b37514ada98f37d32834497d6717 /src/components | |
parent | f6dd890775f29f3031747b9d076359f219d492b4 (diff) | |
download | abaddon-portaudio-8890f5a07111283f9eb0407890cd367a4127fa7b.tar.gz abaddon-portaudio-8890f5a07111283f9eb0407890cd367a4127fa7b.zip |
fix voice channel display name in infobox
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/voiceinfobox.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/voiceinfobox.cpp b/src/components/voiceinfobox.cpp index 4c5a127..26e3720 100644 --- a/src/components/voiceinfobox.cpp +++ b/src/components/voiceinfobox.cpp @@ -96,15 +96,15 @@ void VoiceInfoBox::UpdateLocation() { const auto channel_id = discord.GetVoiceChannelID(); - if (const auto channel = discord.GetChannel(channel_id); channel.has_value() && channel->Name.has_value()) { - if (channel->GuildID.has_value()) { + if (const auto channel = discord.GetChannel(channel_id); channel.has_value()) { + if (channel->Name.has_value() && channel->GuildID.has_value()) { if (const auto guild = discord.GetGuild(*channel->GuildID); guild.has_value()) { m_location.set_label(*channel->Name + " / " + guild->Name); return; } } - m_location.set_label(*channel->Name); + m_location.set_label(channel->GetDisplayName()); return; } |