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

websocket not found method

This commit is contained in:
wdvxdr 2020-12-20 19:11:08 +08:00
parent a1e19bb66e
commit f258b010b9

View File

@ -333,6 +333,16 @@ func (c *websocketConn) handleRequest(bot *coolq.CQBot, payload []byte) {
c.Lock() c.Lock()
defer c.Unlock() defer c.Unlock()
_ = c.WriteJSON(ret) _ = c.WriteJSON(ret)
} else {
ret := global.MSG{
"status": "failed",
"retcode": 1404,
"data": nil,
}
if j.Get("echo").Exists() {
ret["echo"] = j.Get("echo").Value()
}
_ = c.WriteJSON(ret)
} }
} }