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:
commit
68a41d4543
@ -333,6 +333,14 @@ 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 := 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user