Skip to content

Commit

Permalink
Fix broken links in account gallery (mastodon#24218)
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 authored Mar 23, 2023
1 parent 2626097 commit 16da4a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default class MediaItem extends ImmutablePureComponent {
if (['audio', 'video'].includes(attachment.get('type'))) {
content = (
<img
src={attachment.get('preview_url') || attachment.getIn(['account', 'avatar_static'])}
src={attachment.get('preview_url') || status.getIn(['account', 'avatar_static'])}
alt={attachment.get('description')}
lang={status.get('language')}
onLoad={this.handleImageLoad}
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/mastodon/selectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export const getAccountGallery = createSelector([
let medias = ImmutableList();

statusIds.forEach(statusId => {
const status = statuses.get(statusId);
medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status).set('account', account)));
const status = statuses.get(statusId).set('account', account);
medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
});

return medias;
Expand Down

0 comments on commit 16da4a0

Please sign in to comment.