ailistener

git clone git://archive.git.mtrnord.blog/OpenHomeAuto/ailistener.git
Log | Files | Refs | LICENSE

commit c2f6fb902c5cbee77da0ec29d1af74c5d4003c01
parent f56ddd001fc3822f1c248274193e5575a2b4460e
Author: MTRNord <mtrnord1@gmail.com>
Date:   Thu, 28 Jun 2018 22:29:12 +0200

Remove wrong field

Diffstat:
M.idea/usage.statistics.xml | 4++--
Mpkg/webhook/webhook.go | 9++++-----
2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/.idea/usage.statistics.xml b/.idea/usage.statistics.xml @@ -39,13 +39,13 @@ <usages-collector id="statistics.file.extensions.edit"> <counts> <entry key="go" value="783" /> - <entry key="txt" value="418" /> + <entry key="txt" value="435" /> </counts> </usages-collector> <usages-collector id="statistics.file.types.edit"> <counts> <entry key="Go" value="783" /> - <entry key="PLAIN_TEXT" value="418" /> + <entry key="PLAIN_TEXT" value="435" /> </counts> </usages-collector> <usages-collector id="statistics.file.extensions.open"> diff --git a/pkg/webhook/webhook.go b/pkg/webhook/webhook.go @@ -95,10 +95,9 @@ type OriginalResp struct { Intent string `json:"intent"` } `json:"inputs"` User struct { - LastSeen time.Time `json:"lastSeen"` - Locale string `json:"locale"` - UserID string `json:"userId"` - AccessToken string `json:"accessToken"` + LastSeen time.Time `json:"lastSeen"` + Locale string `json:"locale"` + UserID string `json:"userId"` } `json:"user"` Conversation struct { ConversationID string `json:"conversationId"` @@ -150,7 +149,7 @@ func MessagesEndPoint(rw http.ResponseWriter, req *http.Request) { return } - if oresp.Payload.User.AccessToken == "" { + if oresp.Payload.User.UserID == "" { resp := dflow.DoSignIn() // Do things with the context you just retrieved dff := &df.Fulfillment{