diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 10:24:50 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 10:24:50 +0100 |
commit | fb48cc3b7400f73c01d59a038eaf7fc3020c39f4 (patch) | |
tree | 8c438fdf1cfc61a7292115b7787b46b9280a5d1b /app/assets/javascripts/components/containers | |
parent | e616ffc5d60acafb67dadf90e396226d408d0cda (diff) |
Desktop notifications
Diffstat (limited to 'app/assets/javascripts/components/containers')
-rw-r--r-- | app/assets/javascripts/components/containers/mastodon.jsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx index cf77c169d..a8a9e365e 100644 --- a/app/assets/javascripts/components/containers/mastodon.jsx +++ b/app/assets/javascripts/components/containers/mastodon.jsx @@ -60,8 +60,10 @@ const Mastodon = React.createClass({ mixins: [PureRenderMixin], componentWillMount() { - store.dispatch(setAccessToken(this.props.token)); - store.dispatch(setAccountSelf(JSON.parse(this.props.account))); + const { token, account, locale } = this.props; + + store.dispatch(setAccessToken(token)); + store.dispatch(setAccountSelf(JSON.parse(account))); if (typeof App !== 'undefined') { this.subscription = App.cable.subscriptions.create('TimelineChannel', { @@ -78,7 +80,7 @@ const Mastodon = React.createClass({ case 'block': return store.dispatch(refreshTimeline('mentions', true)); case 'notification': - return store.dispatch(updateNotifications(JSON.parse(data.message))); + return store.dispatch(updateNotifications(JSON.parse(data.message), getMessagesForLocale(locale), locale)); } } |