separated clients handlers, cart->checkout ppline
This commit is contained in:
20
handlers/client/security.py
Normal file
20
handlers/client/security.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user