21 lines
733 B
Python
21 lines
733 B
Python
from aiogram import Router, F
|
||
from aiogram.enums import MessageOriginType
|
||
from aiogram.types import Message
|
||
|
||
from config import VERIFIED_ACCOUNTS
|
||
|
||
router = Router()
|
||
|
||
|
||
@router.message(F.forward_origin)
|
||
async def security_check(msg: Message):
|
||
if (
|
||
msg.forward_origin.type == MessageOriginType.USER
|
||
and msg.forward_origin.sender_user.id in VERIFIED_ACCOUNTS
|
||
):
|
||
text = "🍃 Вы общаетесь с оффициальным аккаунтом Екатерины."
|
||
else:
|
||
text = "<b>❌ Вы общаетесь с подставным лицом. Мы советуем закончить диалог с мошенником как можно быстрее.</b>"
|
||
|
||
await msg.answer(text)
|