diff --git a/app/soapbox/__fixtures__/mk.json b/app/soapbox/__fixtures__/mk.json
new file mode 100644
index 000000000..a7c841f1e
--- /dev/null
+++ b/app/soapbox/__fixtures__/mk.json
@@ -0,0 +1,123 @@
+{
+ "acct": "mk",
+ "avatar": "https://media.spinster.xyz/4043b9fb3f9d468aa48a8d68294f338914d9d54b2816aa1c789f548efe6c6239.jpg",
+ "avatar_static": "https://media.spinster.xyz/4043b9fb3f9d468aa48a8d68294f338914d9d54b2816aa1c789f548efe6c6239.jpg",
+ "bot": false,
+ "created_at": "2019-08-01T22:06:30.000Z",
+ "display_name": "M. K. Fain",
+ "emojis": [
+ {
+ "shortcode": "4w",
+ "static_url": "https://spinster.xyz/emoji/custom/4w.png",
+ "url": "https://spinster.xyz/emoji/custom/4w.png",
+ "visible_in_picker": false
+ },
+ {
+ "shortcode": "spinster",
+ "static_url": "https://spinster.xyz/emoji/custom/spinster.png",
+ "url": "https://spinster.xyz/emoji/custom/spinster.png",
+ "visible_in_picker": false
+ }
+ ],
+ "fields": [
+ {
+ "name": "Website",
+ "value": "https://marykatefain.com"
+ },
+ {
+ "name": "Twitter",
+ "value": "https://twitter.com/mkay_fain"
+ },
+ {
+ "name": "Patreon",
+ "value": "https://www.patreon.com/mkfain"
+ },
+ {
+ "name": "Paypal",
+ "value": "https://www.paypal.com/donate?hosted_button_id=NYXHYFQ6CRWJJ"
+ },
+ {
+ "name": "Facebook",
+ "value": "https://www.facebook.com/M-K-Fain-102559968375112"
+ },
+ {
+ "name": "Dog Pics",
+ "value": "https://www.instagram.com/mmkaayyy92"
+ },
+ {
+ "name": "$BTC",
+ "value": "bc1q7fp347muhnuxrtu0pft6eswn0e7pldhssdg8py"
+ }
+ ],
+ "followers_count": 5687,
+ "following_count": 18017,
+ "fqn": "mk@spinster.xyz",
+ "header": "https://media.spinster.xyz/3a5f9d5ef06940d0c319f8f0135b1153a8a42cefd10eace97378875c0347da71.png",
+ "header_static": "https://media.spinster.xyz/3a5f9d5ef06940d0c319f8f0135b1153a8a42cefd10eace97378875c0347da71.png",
+ "id": "9y4BZYXEDuQ6K1zW9g",
+ "last_status_at": "2022-02-27T01:58:21",
+ "locked": false,
+ "note": ":spinster: Admin of @spinster
:4w: Editor of @4WPub
Sorry I didn't reply to you.
Boost ≠ agree. All opinions my own.",
+ "pleroma": {
+ "accepts_chat_messages": true,
+ "also_known_as": [],
+ "ap_id": "https://spinster.xyz/users/mk",
+ "background_image": null,
+ "favicon": "https://spinster.xyz/favicon.png",
+ "hide_favorites": true,
+ "hide_followers": false,
+ "hide_followers_count": false,
+ "hide_follows": false,
+ "hide_follows_count": false,
+ "is_admin": true,
+ "is_confirmed": true,
+ "is_moderator": false,
+ "is_suggested": true,
+ "relationship": {},
+ "skip_thread_containment": false,
+ "tags": [
+ "verified"
+ ]
+ },
+ "source": {
+ "fields": [
+ {
+ "name": "Website",
+ "value": "https://marykatefain.com"
+ },
+ {
+ "name": "Twitter",
+ "value": "https://twitter.com/mkay_fain"
+ },
+ {
+ "name": "Patreon",
+ "value": "https://www.patreon.com/mkfain"
+ },
+ {
+ "name": "Paypal",
+ "value": "https://www.paypal.com/donate?hosted_button_id=NYXHYFQ6CRWJJ"
+ },
+ {
+ "name": "Facebook",
+ "value": "https://www.facebook.com/M-K-Fain-102559968375112"
+ },
+ {
+ "name": "Dog Pics",
+ "value": "https://www.instagram.com/mmkaayyy92"
+ },
+ {
+ "name": "$BTC",
+ "value": "bc1q7fp347muhnuxrtu0pft6eswn0e7pldhssdg8py"
+ }
+ ],
+ "note": ":spinster: Admin of @spinster\r\n:4w: Editor of @4WPub\r\n\r\nSorry I didn't reply to you.\r\n\r\nBoost ≠ agree. All opinions my own.",
+ "pleroma": {
+ "actor_type": "Person",
+ "discoverable": false
+ },
+ "sensitive": false
+ },
+ "statuses_count": 9580,
+ "url": "https://spinster.xyz/users/mk",
+ "username": "mk"
+}
diff --git a/app/soapbox/__fixtures__/realDonaldTrump.json b/app/soapbox/__fixtures__/realDonaldTrump.json
new file mode 100644
index 000000000..c9cf20076
--- /dev/null
+++ b/app/soapbox/__fixtures__/realDonaldTrump.json
@@ -0,0 +1,26 @@
+{
+ "id": "107780257626128497",
+ "username": "realDonaldTrump",
+ "acct": "realDonaldTrump",
+ "display_name": "Donald J. Trump",
+ "locked": false,
+ "bot": false,
+ "discoverable": null,
+ "group": false,
+ "created_at": "2022-02-11T00:00:00.000Z",
+ "note": "
45th President of the United States of America
", + "url": "https://truthsocial.com/@realDonaldTrump", + "avatar": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/780/257/626/128/497/original/573cf5cc8281e7e9.jpeg", + "avatar_static": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/avatars/107/780/257/626/128/497/original/573cf5cc8281e7e9.jpeg", + "header": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/780/257/626/128/497/original/3c1acf607b065ded.jpeg", + "header_static": "https://static-assets.truthsocial.com/tmtg:prime-truth-social-assets/accounts/headers/107/780/257/626/128/497/original/3c1acf607b065ded.jpeg", + "followers_count": 51507, + "following_count": 1, + "statuses_count": 1, + "last_status_at": "2022-02-14", + "verified": true, + "location": "", + "website": "", + "emojis": [], + "fields": [] +} diff --git a/app/soapbox/components/display_name.js b/app/soapbox/components/display_name.js index eca526679..87947af46 100644 --- a/app/soapbox/components/display_name.js +++ b/app/soapbox/components/display_name.js @@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper'; -import { isVerified } from 'soapbox/utils/accounts'; import { displayFqn } from 'soapbox/utils/state'; import { getAcct } from '../utils/accounts'; @@ -38,7 +37,7 @@ class DisplayName extends React.PureComponent { const { account, displayFqn, others, children, withDate } = this.props; let displayName, suffix; - const verified = isVerified(account); + const verified = account.get('verified'); const createdAt = account.get('created_at'); diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index 8b5a5f258..4881d6b7d 100644 --- a/app/soapbox/features/account/components/header.js +++ b/app/soapbox/features/account/components/header.js @@ -27,7 +27,6 @@ import { isStaff, isAdmin, isModerator, - isVerified, isLocal, isRemote, getDomain, @@ -451,7 +450,7 @@ class Header extends ImmutablePureComponent { } } - if (isVerified(account)) { + if (account.get('verified')) { menu.push({ text: intl.formatMessage(messages.unverifyUser, { name: account.get('username') }), action: this.props.onUnverifyUser, diff --git a/app/soapbox/features/edit_profile/components/profile_preview.js b/app/soapbox/features/edit_profile/components/profile_preview.js index 3b73e48f8..ad1db11ed 100644 --- a/app/soapbox/features/edit_profile/components/profile_preview.js +++ b/app/soapbox/features/edit_profile/components/profile_preview.js @@ -6,7 +6,7 @@ import { Link } from 'react-router-dom'; import StillImage from 'soapbox/components/still_image'; import VerificationBadge from 'soapbox/components/verification_badge'; -import { getAcct, isVerified } from 'soapbox/utils/accounts'; +import { getAcct } from 'soapbox/utils/accounts'; import { displayFqn } from 'soapbox/utils/state'; const mapStateToProps = state => ({ @@ -28,7 +28,7 @@ const ProfilePreview = ({ account, displayFqn }) => ( {account.get('display_name')} - {isVerified(account) &&