Skip to content

Commit 262667c

Browse files
committed
fix(telegram): use is-not-None fallbacks in send_attachment (audit)
1 parent 3a20aae commit 262667c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/chat_sdk/adapters/telegram/adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,8 +1962,8 @@ async def send_attachment(
19621962
form_data.add_field(
19631963
upload["field"],
19641964
data,
1965-
filename=attachment.name or "attachment",
1966-
content_type=attachment.mime_type or "application/octet-stream",
1965+
filename=attachment.name if attachment.name is not None else "attachment",
1966+
content_type=attachment.mime_type if attachment.mime_type is not None else "application/octet-stream",
19671967
)
19681968

19691969
if reply_markup:

0 commit comments

Comments
 (0)