From 7ee93b74317c0b51516146fbe32e72cd9bbb151c Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 6 Feb 2024 18:10:17 +0100 Subject: [PATCH] Change `source` attribute of `Suggestion` entity in `/api/v2/suggestions` back to a string (#29108) --- .../components/inline_follow_suggestions.jsx | 8 ++++---- app/models/account_suggestions.rb | 4 ++-- app/models/account_suggestions/suggestion.rb | 2 +- app/serializers/rest/suggestion_serializer.rb | 15 +++++++++++++- spec/requests/api/v2/suggestions_spec.rb | 20 ++++++++++++++++++- .../rest/suggestion_serializer_spec.rb | 2 +- 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/app/javascript/mastodon/features/home_timeline/components/inline_follow_suggestions.jsx b/app/javascript/mastodon/features/home_timeline/components/inline_follow_suggestions.jsx index ac414d04d6..f76526e045 100644 --- a/app/javascript/mastodon/features/home_timeline/components/inline_follow_suggestions.jsx +++ b/app/javascript/mastodon/features/home_timeline/components/inline_follow_suggestions.jsx @@ -59,7 +59,7 @@ Source.propTypes = { id: PropTypes.oneOf(['friends_of_friends', 'similar_to_recently_followed', 'featured', 'most_followed', 'most_interactions']), }; -const Card = ({ id, source }) => { +const Card = ({ id, sources }) => { const intl = useIntl(); const account = useSelector(state => state.getIn(['accounts', id])); const relationship = useSelector(state => state.getIn(['relationships', id])); @@ -89,7 +89,7 @@ const Card = ({ id, source }) => {
- {firstVerifiedField ? : } + {firstVerifiedField ? : }