Skip to content

Commit 24b4674

Browse files
Fix typehints for update_chat_notifications
1 parent 8f0156c commit 24b4674

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyrogram/methods/chats/update_chat_notifications.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
import datetime
19+
from datetime import datetime, timedelta
2020
from typing import Union
2121

2222
import pyrogram
@@ -77,8 +77,8 @@ async def update_chat_notifications(
7777
if not mute_until:
7878
mute_until = utils.max_datetime() if mute else utils.zero_datetime()
7979

80-
if isinstance(mute_until, datetime.timedelta):
81-
mute_until = datetime.datetime.now() + mute_until
80+
if isinstance(mute_until, timedelta):
81+
mute_until = datetime.now() + mute_until
8282

8383
r = await self.invoke(
8484
raw.functions.account.UpdateNotifySettings(

0 commit comments

Comments
 (0)