v2 Suggestions: conditionally display admin actions

This commit is contained in:
Alex Gleason 2021-11-26 23:53:50 -06:00
parent 92439137c1
commit 4c11a3041f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 14 additions and 12 deletions

View File

@ -407,6 +407,7 @@ class Header extends ImmutablePureComponent {
}); });
} }
if (features.suggestionsV2) {
if (account.getIn(['pleroma', 'is_suggested'])) { if (account.getIn(['pleroma', 'is_suggested'])) {
menu.push({ menu.push({
text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }), text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }),
@ -420,6 +421,7 @@ class Header extends ImmutablePureComponent {
icon: require('@tabler/icons/icons/user-check.svg'), icon: require('@tabler/icons/icons/user-check.svg'),
}); });
} }
}
if (account.get('id') !== me) { if (account.get('id') !== me) {
menu.push({ menu.push({