Skip to content

Commit 98fbe39

Browse files
committed
check content type
1 parent 6b25b8c commit 98fbe39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/client-telegram/src/messageManager.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,9 @@ export class MessageManager {
684684
): Promise<Message.TextMessage[]> {
685685
if (content.attachments && content.attachments.length > 0) {
686686
content.attachments.map(async (attachment: Media) => {
687-
this.sendImage(ctx, attachment.url, attachment.description);
687+
if (attachment.contentType.startsWith("image")) {
688+
this.sendImage(ctx, attachment.url, attachment.description);
689+
}
688690
});
689691
} else {
690692
const chunks = this.splitMessage(content.text);

0 commit comments

Comments
 (0)