summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/discord/discord.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp
index 12ce4e8..2c7358b 100644
--- a/src/discord/discord.cpp
+++ b/src/discord/discord.cpp
@@ -2200,8 +2200,9 @@ void DiscordClient::HandleGatewayVoiceStateUpdate(const GatewayMessage &msg) {
SetVoiceState(data.UserID, *data.ChannelID);
if (old_state.has_value() && *old_state != *data.ChannelID) {
m_signal_voice_user_disconnect.emit(data.UserID, *old_state);
+ } else if (!old_state.has_value()) {
+ m_signal_voice_user_connect.emit(data.UserID, *data.ChannelID);
}
- m_signal_voice_user_connect.emit(data.UserID, *data.ChannelID);
} else {
const auto old_state = GetVoiceState(data.UserID);
ClearVoiceState(data.UserID);