mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 12:55:56 +01:00
Fix clicking on a profile mention while logged out potentially leading to incorrect account (#33324)
This commit is contained in:
parent
efe4e72f93
commit
a837f7d693
1 changed files with 4 additions and 7 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue