Fix `RuntimeError` in tl cache

pull/1/head
hikariatama 2022-08-08 20:37:20 +00:00
parent 06917f188f
commit a18f254384
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ def install_perms_caching(client: TelegramClient):
async def cleaner(client: TelegramClient):
while True:
for chat, chat_data in client._hikka_perms_cache.copy().items():
for user, user_data in chat_data.items():
for user, user_data in chat_data.items().copy():
if user_data.expired():
del client._hikka_perms_cache[chat][user]
logger.debug(f"Cleaned outdated perms cache {chat=} {user=}")