Skip to content

Commit

Permalink
check content type
Browse files Browse the repository at this point in the history
  • Loading branch information
tcm390 committed Dec 19, 2024
1 parent 6b25b8c commit 98fbe39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/client-telegram/src/messageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,9 @@ export class MessageManager {
): Promise<Message.TextMessage[]> {
if (content.attachments && content.attachments.length > 0) {
content.attachments.map(async (attachment: Media) => {
this.sendImage(ctx, attachment.url, attachment.description);
if (attachment.contentType.startsWith("image")) {
this.sendImage(ctx, attachment.url, attachment.description);
}
});
} else {
const chunks = this.splitMessage(content.text);
Expand Down

0 comments on commit 98fbe39

Please sign in to comment.