about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/selectors/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/selectors/index.js')
-rw-r--r--app/javascript/flavours/glitch/selectors/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js
index 4a3303c36..bb9180d12 100644
--- a/app/javascript/flavours/glitch/selectors/index.js
+++ b/app/javascript/flavours/glitch/selectors/index.js
@@ -183,12 +183,13 @@ export const makeGetNotification = () => {
 export const getAccountGallery = createSelector([
   (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),
   state       => state.get('statuses'),
-], (statusIds, statuses) => {
+  (state, id) => state.getIn(['accounts', id]),
+], (statusIds, statuses, account) => {
   let medias = ImmutableList();
 
   statusIds.forEach(statusId => {
     const status = statuses.get(statusId);
-    medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
+    medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status).set('account', account)));
   });
 
   return medias;