From 8890f5a07111283f9eb0407890cd367a4127fa7b Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 11 May 2023 20:39:18 -0400 Subject: fix voice channel display name in infobox --- src/components/voiceinfobox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/voiceinfobox.cpp') 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; } -- cgit v1.2.3