From cdb1d081199bde97741cc706787e2b409796e4b3 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 22 May 2018 13:05:40 +0200 Subject: [PATCH] [Glitch] Fetch relationships for search results in UI Port webui changes from 750f3e64c9a9d0b1c4b41cd5727c445185643e0f to glitch-soc --- app/javascript/flavours/glitch/actions/search.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js index e86bd848e5..13885c6004 100644 --- a/app/javascript/flavours/glitch/actions/search.js +++ b/app/javascript/flavours/glitch/actions/search.js @@ -1,4 +1,5 @@ import api from 'flavours/glitch/util/api'; +import { fetchRelationships } from './accounts'; export const SEARCH_CHANGE = 'SEARCH_CHANGE'; export const SEARCH_CLEAR = 'SEARCH_CLEAR'; @@ -38,6 +39,7 @@ export function submitSearch() { }, }).then(response => { dispatch(fetchSearchSuccess(response.data)); + dispatch(fetchRelationships(response.data.accounts.map(item => item.id))); }).catch(error => { dispatch(fetchSearchFail(error)); });