From f9206c7c99ba9951ebc359ea85f122df8ffa479d Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 13 Oct 2019 22:58:25 -0400 Subject: [PATCH] Add missing UserID to VoiceProcessingData --- model.go | 1 + node.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/model.go b/model.go index af206ff..895d89c 100644 --- a/model.go +++ b/model.go @@ -91,6 +91,7 @@ type VoiceProcessingData struct { io.ReadCloser Client *http.Client + UserID string URL string File string diff --git a/node.go b/node.go index 8bcd4ea..0c1cdf7 100644 --- a/node.go +++ b/node.go @@ -208,8 +208,10 @@ func (node *Node) onEvent(v *fastjson.Value, msg []byte) error { track := jsonStringValue(v, "track") data := &VoiceProcessingData{ - URL: fmt.Sprintf("%s/audio/%s", node.config.REST, track), - File: track, + Client: node.client, + UserID: jsonStringValue(v, "userId"), + URL: fmt.Sprintf("%s/audio/%s", node.config.REST, track), + File: track, } return player.handler.OnVoiceProcessed(player, data, v.GetBool("hotword"), v.GetBool("override"))