Fixed status/repost functionality to show status if owned by given username

fixes: #47
This commit is contained in:
mgabdev
2019-07-16 14:41:36 -04:00
parent 826773ee79
commit 17af572ec9
4 changed files with 45 additions and 7 deletions

View File

@@ -179,7 +179,11 @@ class Status extends ImmutablePureComponent {
}
const { status } = this.props;
this.context.router.history.push(`/${status.getIn(['account', 'acct'])}/posts/${status.getIn(['reblog', 'id'], status.get('id'))}`);
const isReblog = !!status.getIn(['reblog', 'id']);
const originalPosterUsername = isReblog ? status.getIn(['reblog', 'account', 'acct']) : status.getIn(['account', 'acct']);
this.context.router.history.push(`/${originalPosterUsername}/posts/${status.getIn(['reblog', 'id'], status.get('id'))}`);
}
}