🐛 Fix sudo filters do not filter self

This commit is contained in:
xtaodada 2023-12-16 12:37:56 +08:00
parent a617027a00
commit f7416d4a21
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ def listener(**args):
else:
base_filters = filters.all
permission_name = get_permission_name(is_plugin, need_admin, command)
sudo_filters = sudo_filter(permission_name) & ~filters.via_bot
sudo_filters = sudo_filter(permission_name) & ~filters.via_bot & ~filters.me
if ignore_forwarded:
base_filters &= ~filters.forwarded
sudo_filters &= ~filters.forwarded

View File

@ -23,7 +23,7 @@ async def get_log(token: Optional[str] = Header(...), num: Union[int, str] = 100
num = 100
async def streaming_logs():
with open("pagermaid.log.txt", "r", encoding="utf-8") as f:
with open("data/pagermaid.log.txt", "r", encoding="utf-8") as f:
for log in f.readlines()[-num:]:
yield log
await asyncio.sleep(0.02)