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:
parent
a1e19bb66e
commit
f258b010b9
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user