Фикс ошибки чтения
This commit is contained in:
@@ -295,7 +295,6 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
* Обработчик чтения для личных сообщений
|
||||
*/
|
||||
usePacket(0x07, async (packet : PacketRead) => {
|
||||
info("Read packet received in dialog provider");
|
||||
const fromPublicKey = packet.getFromPublicKey();
|
||||
if(fromPublicKey == publicKey){
|
||||
/**
|
||||
@@ -309,7 +308,10 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if(fromPublicKey != props.dialog && !idle){
|
||||
if(idle){
|
||||
return;
|
||||
}
|
||||
if(fromPublicKey != props.dialog){
|
||||
return;
|
||||
}
|
||||
setMessages((prev) => prev.map((msg) => {
|
||||
@@ -342,7 +344,10 @@ export function DialogProvider(props: DialogProviderProps) {
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if(toPublicKey != props.dialog && !idle){
|
||||
if(idle){
|
||||
return;
|
||||
}
|
||||
if(toPublicKey != props.dialog){
|
||||
return;
|
||||
}
|
||||
setMessages((prev) => prev.map((msg) => {
|
||||
|
||||
Reference in New Issue
Block a user