about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-09-09 05:16:27 -0500
committerSurinna Curtis <ekiru.0@gmail.com>2017-09-13 21:47:30 -0500
commit3278c08c290535e14c9c09559199ed24dd0409c6 (patch)
tree7638fa8db2ae686c91bd33bff459eb5699b905b8 /app/javascript
parent0284fd723b4d45ab2b381ee0c4f6550f44d3abf5 (diff)
make the hide/unhide notifications buttons work
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/components/account.js2
-rw-r--r--app/javascript/mastodon/containers/account_container.js3
2 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js
index faf697c63..5a0c1c1c8 100644
--- a/app/javascript/mastodon/components/account.js
+++ b/app/javascript/mastodon/components/account.js
@@ -44,9 +44,11 @@ export default class Account extends ImmutablePureComponent {
   }
 
   handleMuteNotifications = () => {
+    this.props.onMuteNotifications(this.props.account, true);
   }
 
   handleUnmuteNotifications = () => {
+    this.props.onMuteNotifications(this.props.account, false);    
   }
 
   render () {
diff --git a/app/javascript/mastodon/containers/account_container.js b/app/javascript/mastodon/containers/account_container.js
index 7c77cb764..79e9e6e98 100644
--- a/app/javascript/mastodon/containers/account_container.js
+++ b/app/javascript/mastodon/containers/account_container.js
@@ -63,6 +63,9 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
     }
   },
 
+  onMuteNotifications (account, notifications) {
+    dispatch(muteAccount(account.get('id'), notifications));
+  }
 });
 
 export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Account));