2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Use getattr to get outgoing attribute in filters.me (#1137)

* Use getattr to get outgoing attribute from the message in me_filter.
Fixes #1136.

Signed-off-by: Aliwoto <woto@kaizoku.cyou>

* Update filters.py

Signed-off-by: Aliwoto <woto@kaizoku.cyou>
Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
This commit is contained in:
ALi.w 2022-11-13 16:57:19 +03:30 committed by GitHub
parent b848e05225
commit 31b32184c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ all = create(all_filter)
# region me_filter
async def me_filter(_, __, m: Message):
return bool(m.from_user and m.from_user.is_self or m.outgoing)
return bool(m.from_user and m.from_user.is_self or getattr(m, "outgoing", False))
me = create(me_filter)