diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-09 09:56:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 09:56:53 +0200 |
commit | f2404de871f0bdfda5c9aeeeb4c6c4d10a8da8ab (patch) | |
tree | f45577d1fe26ea56f7323b940f506f8875d7344e /app/javascript/mastodon/features/account_timeline/containers/header_container.js | |
parent | 80176a3814abad7f5c9023f97b5d4d82b73c089d (diff) |
Public profile endorsements (accounts picked by profile owner) (#8146)
Diffstat (limited to 'app/javascript/mastodon/features/account_timeline/containers/header_container.js')
-rw-r--r-- | app/javascript/mastodon/features/account_timeline/containers/header_container.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/account_timeline/containers/header_container.js b/app/javascript/mastodon/features/account_timeline/containers/header_container.js index 7681430b7..02803893d 100644 --- a/app/javascript/mastodon/features/account_timeline/containers/header_container.js +++ b/app/javascript/mastodon/features/account_timeline/containers/header_container.js @@ -8,6 +8,8 @@ import { blockAccount, unblockAccount, unmuteAccount, + pinAccount, + unpinAccount, } from '../../../actions/accounts'; import { mentionCompose, @@ -82,6 +84,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, + onEndorseToggle (account) { + if (account.getIn(['relationship', 'endorsed'])) { + dispatch(unpinAccount(account.get('id'))); + } else { + dispatch(pinAccount(account.get('id'))); + } + }, + onReport (account) { dispatch(initReport(account)); }, |