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:
parent
6f78500d4f
commit
795f0107d2
10 changed files with 61 additions and 11 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue