avoid responding to an ack (#12251)

This commit is contained in:
Kyle Altendorf 2022-07-06 06:06:55 -04:00 committed by GitHub
parent c699a2a20e
commit ef6359638f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,14 +207,14 @@ class RpcServer:
"success": "true",
}
async def ws_api(self, message: WsRpcMessage) -> Dict[str, object]:
async def ws_api(self, message: WsRpcMessage) -> Optional[Dict[str, object]]:
"""
This function gets called when new message is received via websocket.
"""
command = message["command"]
if message["ack"]:
return {}
return None
data: Dict[str, object] = {}
if "data" in message: