Skip to content

Commit

Permalink
🐛 Fix sudo filters do not filter self
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Dec 16, 2023
1 parent a617027 commit f7416d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pagermaid/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pagermaid/web/api/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f7416d4

Please sign in to comment.