Skip to content

Commit c0049ba

Browse files
committed
Strictly check if sleep_threshold is None
1 parent d489157 commit c0049ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyrogram/methods/advanced/send.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ async def send(
7474
if self.takeout_id:
7575
data = raw.functions.InvokeWithTakeout(takeout_id=self.takeout_id, query=data)
7676

77-
r = await self.session.send(data, retries, timeout, sleep_threshold or self.sleep_threshold)
77+
r = await self.session.send(
78+
data, retries, timeout,
79+
(sleep_threshold
80+
if sleep_threshold is not None
81+
else self.sleep_threshold)
82+
)
7883

7984
await self.fetch_peers(getattr(r, "users", []))
8085
await self.fetch_peers(getattr(r, "chats", []))

0 commit comments

Comments
 (0)