Skip to content

Commit

Permalink
Fix “Share @{name}'s profile” profile menu item (mastodon#21490)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and Nonexistent committed Jan 11, 2023
1 parent ea8dd8a commit 3fce759
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/javascript/mastodon/features/account/components/header.js
Expand Up @@ -149,6 +149,17 @@ class Header extends ImmutablePureComponent {
}
}

handleShare = () => {
const { account } = this.props;

navigator.share({
text: `${titleFromAccount(account)}\n${account.get('note_plain')}`,
url: account.get('url'),
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
});
}

render () {
const { account, hidden, intl, domain } = this.props;
const { signedIn } = this.context.identity;
Expand Down

0 comments on commit 3fce759

Please sign in to comment.