Фикс ошибки чтения

This commit is contained in:
RoyceDa
2026-02-26 20:54:52 +02:00
parent b9603462a0
commit c3a53b517e
2 changed files with 10 additions and 7 deletions

View File

@@ -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) => {