fix voice channel display name in infobox

This commit is contained in:
ouwou
2023-05-11 20:39:18 -04:00
parent f6dd890775
commit 8890f5a071

View File

@@ -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;
}