Skip to content

Commit

Permalink
Fix tweet expansions when the tweet has non-photo media
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroCB committed Dec 31, 2020
1 parent b105f52 commit 3f3bfba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1799,10 +1799,12 @@ exports.sendTweetMsg = (id, threadId, includeLink = false) => {
const imgs = includes.media
.filter(media => media.type === "photo")
.map(img => img.url);
this.sendFilesFromUrl(imgs, threadId, msg);
} else {
this.sendMessage(msg, threadId);
if (imgs.length > 0) {
return this.sendFilesFromUrl(imgs, threadId, msg);
}
}

this.sendMessage(msg, threadId);
});
};

Expand Down

0 comments on commit 3f3bfba

Please sign in to comment.