mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-17 08:15:42 +00:00
Some fixes in onChatReceive
This commit is contained in:
parent
31d8cf7842
commit
69348e9339
@ -453,12 +453,7 @@ class Client:
|
|||||||
message = ev_data["message"]
|
message = ev_data["message"]
|
||||||
to_all = ev_data.get("to_all")
|
to_all = ev_data.get("to_all")
|
||||||
if to_all is None:
|
if to_all is None:
|
||||||
if need_send:
|
|
||||||
need_send = False
|
|
||||||
to_all = True
|
to_all = True
|
||||||
if to_all:
|
|
||||||
if need_send:
|
|
||||||
need_send = False
|
|
||||||
to_self = ev_data.get("to_self")
|
to_self = ev_data.get("to_self")
|
||||||
if to_self is None:
|
if to_self is None:
|
||||||
to_self = True
|
to_self = True
|
||||||
@ -467,6 +462,7 @@ class Client:
|
|||||||
if to_client:
|
if to_client:
|
||||||
writer = to_client._writer
|
writer = to_client._writer
|
||||||
await self._send(f"C:{message}", to_all=to_all, to_self=to_self, writer=writer)
|
await self._send(f"C:{message}", to_all=to_all, to_self=to_self, writer=writer)
|
||||||
|
need_send = False
|
||||||
except KeyError | AttributeError:
|
except KeyError | AttributeError:
|
||||||
self.log.error(f"Returns invalid data: {ev_data}")
|
self.log.error(f"Returns invalid data: {ev_data}")
|
||||||
if need_send:
|
if need_send:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user