[Glitch] Include preview cards in status entity in REST API
Port 795f0107d2
to glitch-soc
This commit is contained in:
@@ -7,6 +7,7 @@ import StatusIcons from './status_icons';
|
||||
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 'flavours/glitch/util/async-components';
|
||||
@@ -477,6 +478,15 @@ export default class Status extends ImmutablePureComponent {
|
||||
if (!status.get('sensitive') && !(status.get('spoiler_text').length > 0) && settings.getIn(['collapsed', 'backgrounds', 'preview_images'])) {
|
||||
background = attachments.getIn([0, 'preview_url']);
|
||||
}
|
||||
} else if (status.get('card')) {
|
||||
media = (
|
||||
<Card
|
||||
onOpenMedia={this.props.onOpenMedia}
|
||||
card={status.get('card')}
|
||||
compact
|
||||
/>
|
||||
);
|
||||
//TODO: set mediaIcon?
|
||||
}
|
||||
|
||||
// Here we prepare extra data-* attributes for CSS selectors.
|
||||
|
Reference in New Issue
Block a user