mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-07-03 04:43:26 +00:00
websocket not found method
This commit is contained in:
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user