about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-05-23 18:54:51 +0200
committerGitHub <noreply@github.com>2018-05-23 18:54:51 +0200
commit7719fe0df27a59cb7292989688efaa4efc6cbccc (patch)
tree0ff71321d501cfdb78b1d6405d3c5d71c72154a3 /app
parente4c82e33e41272e16b0eebd595d1eaf5d674eece (diff)
parent247f55f673d13a1fcac5a14b3c771f5aafc2a73e (diff)
Merge pull request #505 from ThibG/glitch-soc/features/fetch-relationships-on-search
[Glitch] Fetch relationships for search results in UI
Diffstat (limited to 'app')
-rw-r--r--app/javascript/flavours/glitch/actions/search.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/search.js b/app/javascript/flavours/glitch/actions/search.js
index e86bd848e..13885c600 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));
     });