From 5f7a201f08af052ef3587429250e62d49da855ed Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 2 Oct 2021 15:26:51 -0500 Subject: [PATCH] Accounts: call isVerified in the places it's missing --- .../features/edit_profile/components/profile_preview.js | 5 ++--- app/soapbox/features/ui/components/user_panel.js | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/soapbox/features/edit_profile/components/profile_preview.js b/app/soapbox/features/edit_profile/components/profile_preview.js index 32ca15cb5..dbb6881d5 100644 --- a/app/soapbox/features/edit_profile/components/profile_preview.js +++ b/app/soapbox/features/edit_profile/components/profile_preview.js @@ -2,10 +2,9 @@ import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { getAcct } from 'soapbox/utils/accounts'; +import { getAcct, isVerified } from 'soapbox/utils/accounts'; import StillImage from 'soapbox/components/still_image'; import VerificationBadge from 'soapbox/components/verification_badge'; -import { List as ImmutableList } from 'immutable'; import { displayFqn } from 'soapbox/utils/state'; const mapStateToProps = state => ({ @@ -27,7 +26,7 @@ const ProfilePreview = ({ account, displayFqn }) => ( {account.get('display_name')} - {account.getIn(['pleroma', 'tags'], ImmutableList()).includes('verified') && } + {isVerified(account) && } @{getAcct(account, displayFqn)} diff --git a/app/soapbox/features/ui/components/user_panel.js b/app/soapbox/features/ui/components/user_panel.js index 41fa65916..f7b3bcd31 100644 --- a/app/soapbox/features/ui/components/user_panel.js +++ b/app/soapbox/features/ui/components/user_panel.js @@ -8,11 +8,10 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Avatar from 'soapbox/components/avatar'; import { shortNumberFormat } from 'soapbox/utils/numbers'; -import { getAcct } from 'soapbox/utils/accounts'; +import { getAcct, isVerified } from 'soapbox/utils/accounts'; import { displayFqn } from 'soapbox/utils/state'; import StillImage from 'soapbox/components/still_image'; import VerificationBadge from 'soapbox/components/verification_badge'; -import { List as ImmutableList } from 'immutable'; class UserPanel extends ImmutablePureComponent { @@ -28,7 +27,6 @@ class UserPanel extends ImmutablePureComponent { if (!account) return null; const displayNameHtml = { __html: account.get('display_name_html') }; const acct = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct'); - const verified = account.getIn(['pleroma', 'tags'], ImmutableList()).includes('verified'); const header = account.get('header'); return ( @@ -51,7 +49,7 @@ class UserPanel extends ImmutablePureComponent {

- {verified && } + {isVerified(account) && } @{getAcct(account, displayFqn)}