Update pkg/channels/wecom/aibot.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4a87090fd9
commit
e88b39f21e
1 changed files with 5 additions and 2 deletions
|
|
@ -928,9 +928,12 @@ func (c *WeComAIBotChannel) encryptResponse(
|
|||
return string(respJSON)
|
||||
}
|
||||
|
||||
// encryptEmptyResponse returns empty encrypted response
|
||||
// encryptEmptyResponse returns a minimal valid encrypted response
|
||||
func (c *WeComAIBotChannel) encryptEmptyResponse(timestamp, nonce string) string {
|
||||
return ""
|
||||
// Construct a zero-value stream response and encrypt it so that
|
||||
// WeCom always receives a syntactically valid encrypted JSON object.
|
||||
emptyResp := WeComAIBotStreamResponse{}
|
||||
return c.encryptResponse("", timestamp, nonce, emptyResp)
|
||||
}
|
||||
|
||||
// encryptMessage encrypts a plain text message for WeCom AI Bot
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue