summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body.jsx
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-02-23 14:00:02 -0800
committerCorey Hulen <corey@hulen.com>2016-02-23 14:00:02 -0800
commit52767d9dcdc84fca4cd7a5b5c7ece2650691b91d (patch)
treeb18c4d3de81a24a04147f1bb375fed9a390f7b2b /web/react/components/post_body.jsx
parent6e0ce387a35cccb0ecc849936acab62e75e90128 (diff)
parentd6c6f5eaeacd16b3615c855ab7b8aa51f9f46efe (diff)
downloadchat-52767d9dcdc84fca4cd7a5b5c7ece2650691b91d.tar.gz
chat-52767d9dcdc84fca4cd7a5b5c7ece2650691b91d.tar.bz2
chat-52767d9dcdc84fca4cd7a5b5c7ece2650691b91d.zip
Merge pull request #2215 from hmhealey/plt1678
PLT-1678 Refactored how links are extracted to remove code blocks and markdown images
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r--web/react/components/post_body.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index b187acba3..506b38ce6 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -41,7 +41,7 @@ class PostBody extends React.Component {
const linkData = Utils.extractLinks(this.props.post.message);
this.state = {
- links: linkData.links,
+ links: linkData,
post: this.props.post
};
}
@@ -86,10 +86,10 @@ class PostBody extends React.Component {
componentWillReceiveProps(nextProps) {
const linkData = Utils.extractLinks(nextProps.post.message);
if (this.props.post.filenames.length === 0 && this.state.links && this.state.links.length > 0) {
- this.embed = this.createEmbed(linkData.links[0]);
+ this.embed = this.createEmbed(linkData[0]);
}
this.setState({
- links: linkData.links
+ links: linkData
});
}