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(