From 4af3434a3b837dbb45ac504d1e47825c068722a4 Mon Sep 17 00:00:00 2001 From: whymequestion Date: Wed, 11 Mar 2026 23:57:46 +0500 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B9=20=D0=B8=D0=BC=D0=BF=D0=BE?= =?UTF-8?q?=D1=80=D1=82,=20=D0=BD=D0=B5=20=D0=B4=D0=B0=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D1=8C=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=B8=D0=B7=20=D1=87=D0=B0=D1=82=D0=B0=20=D0=BD=D0=B5=D0=B7?= =?UTF-8?q?=D0=BD=D0=B0=D0=BA=D0=BE=D0=BC=D1=86=D0=B0=D0=BC,=20=D0=B3?= =?UTF-8?q?=D0=B5=D0=BE=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D1=87=D0=B5=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B2=D0=B5=D1=80=D0=BD=D1=8B=D0=B5=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=B4?= =?UTF-8?q?=D0=B1...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/oneme_tcp/processors.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/oneme_tcp/processors.py b/src/oneme_tcp/processors.py index 94184f7..91209f8 100644 --- a/src/oneme_tcp/processors.py +++ b/src/oneme_tcp/processors.py @@ -1,4 +1,4 @@ -import json, random, secrets, hashlib, time, logging +import json, secrets, hashlib, time, logging from oneme_tcp.models import * from oneme_tcp.proto import Proto from oneme_tcp.config import OnemeConfig @@ -217,7 +217,7 @@ class Processors: # Создаем сессию await cursor.execute( "INSERT INTO tokens (phone, token_hash, device_type, device_name, location, time) VALUES (%s, %s, %s, %s, %s, %s)", - (stored_token.get("phone"), hashed_login, deviceType, deviceName, "Epstein Island", int(time.time()),) + (stored_token.get("phone"), hashed_login, deviceType, deviceName, "Little Saint James Island", int(time.time()),) # весь покрытый зеленью, абсолютно весь, остров невезения в океане есть ) # Генерируем профиль @@ -677,10 +677,12 @@ class Processors: chat = await cursor.fetchone() if chat: - # Если чат - диалог, и пользователь в нем не состоит, - # то продолжаем без добавления результата - if chat.get("type") == self.chat_types.DIALOG and senderId not in json.loads(chat.get("participants")): - continue + # Проверяем, является ли пользователь участником чата + + # (в max нельзя смотреть и отправлять сообщения в чат, в котором ты не участник, в отличие от tg (например, комментарии в каналах), + # так что надо тоже так делать) + if senderId not in json.loads(chat.get("participants")): + continue # Получаем последнее сообщение из чата message, messageTime = await self.tools.get_last_message(