Fix clicking on a profile mention while logged out potentially leading to incorrect account (#33324)
This commit is contained in:
		@@ -79,15 +79,12 @@ export const expandSearch = createDataLoadingThunk(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export const openURL = createDataLoadingThunk(
 | 
					export const openURL = createDataLoadingThunk(
 | 
				
			||||||
  'search/openURL',
 | 
					  'search/openURL',
 | 
				
			||||||
  ({ url }: { url: string }, { getState }) => {
 | 
					  ({ url }: { url: string }) =>
 | 
				
			||||||
    const signedIn = !!getState().meta.get('me');
 | 
					    apiGetSearch({
 | 
				
			||||||
 | 
					 | 
				
			||||||
    return apiGetSearch({
 | 
					 | 
				
			||||||
      q: url,
 | 
					      q: url,
 | 
				
			||||||
      resolve: signedIn,
 | 
					      resolve: true,
 | 
				
			||||||
      limit: 1,
 | 
					      limit: 1,
 | 
				
			||||||
    });
 | 
					    }),
 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  (data, { dispatch }) => {
 | 
					  (data, { dispatch }) => {
 | 
				
			||||||
    if (data.accounts.length > 0) {
 | 
					    if (data.accounts.length > 0) {
 | 
				
			||||||
      dispatch(importFetchedAccounts(data.accounts));
 | 
					      dispatch(importFetchedAccounts(data.accounts));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user