diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-01-07 20:13:57 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-01-07 20:16:09 -0500 |
commit | 78adcf2f5c9858d241dcf6f6e48f2f64bbc63f4e (patch) | |
tree | 684342fafb6704797897d3d1c9a94caf74ba0e77 | |
parent | ef37d5a4860329814d53233290438383928215bb (diff) | |
download | abaddon-portaudio-78adcf2f5c9858d241dcf6f6e48f2f64bbc63f4e.tar.gz abaddon-portaudio-78adcf2f5c9858d241dcf6f6e48f2f64bbc63f4e.zip |
fix voice_user_connect signal
-rw-r--r-- | src/discord/discord.cpp | 3 |
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); |