Skip to content

Commit

Permalink
Merge pull request #1102 from epochtalk/fix-image-pms
Browse files Browse the repository at this point in the history
fix: images in private messages
  • Loading branch information
akinsey committed Nov 9, 2020
2 parents 55a5d09 + 1350aaa commit d6fbf46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ept-images/plugins/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ images.imageSub = (post) => {
return images.saveImage(imgSrc)
.then(function(savedUrl) {
if (savedUrl) {
post.body = post.body.replace(imgSrc, savedUrl);
if (post.content) {
post.content.body = post.content.body.replace(imgSrc, savedUrl);
}
else {
post.body = post.body.replace(imgSrc, savedUrl);
}
}
});
})
Expand Down

0 comments on commit d6fbf46

Please sign in to comment.