diff options
Diffstat (limited to 'app/javascript/mastodon/features/status/components/action_bar.js')
-rw-r--r-- | app/javascript/mastodon/features/status/components/action_bar.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js index 9431b11c1..c303caf10 100644 --- a/app/javascript/mastodon/features/status/components/action_bar.js +++ b/app/javascript/mastodon/features/status/components/action_bar.js @@ -82,12 +82,16 @@ export default class ActionBar extends React.PureComponent { render () { const { status, me, intl } = this.props; + const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); + let menu = []; - menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); + if (publicStatus) { + menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); + } if (me === status.getIn(['account', 'id'])) { - if (['public', 'unlisted'].indexOf(status.get('visibility')) !== -1) { + if (publicStatus) { menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick }); } |