Fix embed dropdown menu item for unauthenticated users (#25964)
This commit is contained in:
@@ -205,7 +205,7 @@ class ActionBar extends PureComponent {
|
||||
menu.push({ text: intl.formatMessage(messages.share), action: this.handleShare });
|
||||
}
|
||||
|
||||
if (publicStatus) {
|
||||
if (publicStatus && (signedIn || !isRemote)) {
|
||||
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
|
||||
}
|
||||
|
||||
|
@@ -110,7 +110,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||
dispatch(openModal({
|
||||
modalType: 'EMBED',
|
||||
modalProps: {
|
||||
url: status.get('url'),
|
||||
id: status.get('id'),
|
||||
onError: error => dispatch(showAlertForError(error)),
|
||||
},
|
||||
}));
|
||||
|
@@ -449,7 +449,7 @@ class Status extends ImmutablePureComponent {
|
||||
handleEmbed = (status) => {
|
||||
this.props.dispatch(openModal({
|
||||
modalType: 'EMBED',
|
||||
modalProps: { url: status.get('url') },
|
||||
modalProps: { id: status.get('id') },
|
||||
}));
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user