about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/account_gallery/components/media_item.js
diff options
context:
space:
mode:
authortrwnh <a@trwnh.com>2022-11-13 14:10:20 -0600
committerGitHub <noreply@github.com>2022-11-13 21:10:20 +0100
commit07229089a63151a941e3bf9ff8e2fb5037b14b43 (patch)
tree014309b5190293fe506a400be5833a52cacaf352 /app/javascript/mastodon/features/account_gallery/components/media_item.js
parentad66bbed6291fa1cd3aee21e184d3ec7610688fa (diff)
Change in-app links to keep you in-app (#20540)
* Change in-app links to keep you in-app

* refactor Permalink into Link

* rewrite link hrefs in status content

* please linter

* please linter again
Diffstat (limited to 'app/javascript/mastodon/features/account_gallery/components/media_item.js')
-rw-r--r--app/javascript/mastodon/features/account_gallery/components/media_item.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.js b/app/javascript/mastodon/features/account_gallery/components/media_item.js
index ba7ec46a3..3190caeb4 100644
--- a/app/javascript/mastodon/features/account_gallery/components/media_item.js
+++ b/app/javascript/mastodon/features/account_gallery/components/media_item.js
@@ -129,7 +129,7 @@ export default class MediaItem extends ImmutablePureComponent {
 
     return (
       <div className='account-gallery__item' style={{ width, height }}>
-        <a className='media-gallery__item-thumbnail' href={status.get('url')} onClick={this.handleClick} title={title} target='_blank' rel='noopener noreferrer'>
+        <a className='media-gallery__item-thumbnail' href={`/@${status.getIn(['account', 'acct'])}\/${status.get('id')}`} onClick={this.handleClick} title={title} target='_blank' rel='noopener noreferrer'>
           <Blurhash
             hash={attachment.get('blurhash')}
             className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })}