Skip to content

Commit

Permalink
MM-11449 Show OpenGraph previews for pages with any of the required f…
Browse files Browse the repository at this point in the history
…ields (mattermost#1639)

* MM-11449 Show OpenGraph previews for pages with any of the required fields

* Update mattermost-redux
  • Loading branch information
hmhealey authored Aug 30, 2018
1 parent 747c7d6 commit 330d23c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,16 @@ export default class PostAttachmentOpenGraph extends React.PureComponent {
}

render() {
if (!this.props.post || isSystemMessage(this.props.post)) {
return null;
}

if (this.state.removePreview) {
return null;
}

const data = this.props.openGraphData;
if (!data || !data.url || this.state.removePreview || isSystemMessage(this.props.post || {})) {
if (!data) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"localforage": "1.7.2",
"localforage-observable": "1.4.0",
"marked": "github:mattermost/marked#ed33baecd7d7fa97d479ba22dde9d226b083d67d",
"mattermost-redux": "github:mattermost/mattermost-redux#1c381497e539c074a4d5ef54ef4353462736316f",
"mattermost-redux": "github:mattermost/mattermost-redux#28be3683bff6ae8c563883bb0ff04d7bd9ea31ee",
"moment-timezone": "0.5.21",
"pdfjs-dist": "2.0.489",
"perfect-scrollbar": "0.8.1",
Expand All @@ -37,12 +37,12 @@
"react-color": "2.14.1",
"react-contextmenu": "2.9.3",
"react-custom-scrollbars": "4.2.1",
"react-day-picker": "7.2.1",
"react-dom": "16.4.2",
"react-intl": "2.4.0",
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"react-select": "1.3.0",
"react-day-picker": "7.2.1",
"redux": "4.0.0",
"redux-batched-actions": "0.4.0",
"redux-persist": "4.9.1",
Expand Down

0 comments on commit 330d23c

Please sign in to comment.