소스 검색

Clean up state access. (#261)

Clean up state access.
Chris Rhodes 8 년 전
부모
커밋
c6ee0d2dd5
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      wsapi.go

+ 3 - 3
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
 }