0
0
Fork 0

Include preview cards in status entity in REST API (#9120)

* Include preview cards in status entity in REST API

* Display preview card in-stream

* Improve in-stream display of preview cards
This commit is contained in:
Eugen Rochko 2018-10-28 06:35:03 +01:00 committed by GitHub
parent 6f78500d4f
commit 795f0107d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 61 additions and 11 deletions

View file

@ -9,6 +9,7 @@ import DisplayName from './display_name';
import StatusContent from './status_content';
import StatusActionBar from './status_action_bar';
import AttachmentList from './attachment_list';
import Card from '../features/status/components/card';
import { injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { MediaGallery, Video } from '../features/ui/util/async-components';
@ -256,6 +257,14 @@ class Status extends ImmutablePureComponent {
</Bundle>
);
}
} else if (status.get('spoiler_text').length === 0 && status.get('card')) {
media = (
<Card
onOpenMedia={this.props.onOpenMedia}
card={status.get('card')}
compact
/>
);
}
if (otherAccounts) {