Skip to content

Commit

Permalink
Use deepcopy for async
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2020official authored Jul 27, 2024
1 parent 2ae6b93 commit 74019d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telebot/async_telebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import string
import random
import ssl

import copy

"""
Module : telebot
Expand Down Expand Up @@ -558,7 +558,7 @@ async def _run_middlewares_and_handlers(self, message, handlers, middlewares, up
logger.error("It is not allowed to pass data and values inside data to the handler. Check your handler: {}".format(handler['function']))
return
else:
data_copy = data.copy()
data_copy = copy.deepcopy(data)
for key in list(data_copy):
# remove data from data_copy if handler does not accept it
if key not in params:
Expand Down

0 comments on commit 74019d0

Please sign in to comment.