1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00

Merge pull request #509 from wdvxdr1123/patch/ios

websocket not found method fix#508
This commit is contained in:
Mrs4s 2020-12-20 19:21:09 +08:00 committed by GitHub
commit 68a41d4543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,6 +333,14 @@ func (c *websocketConn) handleRequest(bot *coolq.CQBot, payload []byte) {
c.Lock()
defer c.Unlock()
_ = c.WriteJSON(ret)
} else {
ret := coolq.Failed(1404,"API_NOT_FOUND","API不存在")
if j.Get("echo").Exists() {
ret["echo"] = j.Get("echo").Value()
}
c.Lock()
defer c.Unlock()
_ = c.WriteJSON(ret)
}
}