From c6ee0d2dd59d9ff0c3afaa7d909f0ec9d2d63abb Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Tue, 27 Sep 2016 22:45:12 -0700 Subject: [PATCH] Clean up state access. (#261) Clean up state access. --- wsapi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wsapi.go b/wsapi.go index 719cd8f..54a420e 100644 --- a/wsapi.go +++ b/wsapi.go @@ -522,13 +522,13 @@ func (s *Session) onVoiceStateUpdate(se *Session, st *VoiceStateUpdate) { return } - // We only care about events that are about us - if se.State.Ready.User.ID != st.UserID { + // We only care about events that are about us. + if se.State.User.ID != st.UserID { return } // Store the SessionID for later use. - voice.UserID = st.UserID // TODO: Review + voice.UserID = st.UserID voice.sessionID = st.SessionID }