From a837f7d693a170772b5a414a703fde58f970500e Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 16 Dec 2024 20:29:51 +0100 Subject: [PATCH] Fix clicking on a profile mention while logged out potentially leading to incorrect account (#33324) --- app/javascript/mastodon/actions/search.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/actions/search.ts b/app/javascript/mastodon/actions/search.ts index 7ee432f782..7dd174e202 100644 --- a/app/javascript/mastodon/actions/search.ts +++ b/app/javascript/mastodon/actions/search.ts @@ -79,15 +79,12 @@ export const expandSearch = createDataLoadingThunk( export const openURL = createDataLoadingThunk( 'search/openURL', - ({ url }: { url: string }, { getState }) => { - const signedIn = !!getState().meta.get('me'); - - return apiGetSearch({ + ({ url }: { url: string }) => + apiGetSearch({ q: url, - resolve: signedIn, + resolve: true, limit: 1, - }); - }, + }), (data, { dispatch }) => { if (data.accounts.length > 0) { dispatch(importFetchedAccounts(data.accounts));