1
0
Fork 0
forked from fedi/mastodon

bug fix (WebPush does not work) (#6120)

This commit is contained in:
MitarashiDango 2017-12-29 00:20:34 +09:00 committed by Eugen Rochko
parent 868568d1c1
commit 511c6f9625
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ const sendSubscriptionToBackend = (subscription, me) => {
// Last one checks for payload support: https://web-push-book.gauntface.com/chapter-06/01-non-standards-browsers/#no-payload // Last one checks for payload support: https://web-push-book.gauntface.com/chapter-06/01-non-standards-browsers/#no-payload
const supportsPushNotifications = ('serviceWorker' in navigator && 'PushManager' in window && 'getKey' in PushSubscription.prototype); const supportsPushNotifications = ('serviceWorker' in navigator && 'PushManager' in window && 'getKey' in PushSubscription.prototype);
export default function register () { export function register () {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch(setBrowserSupport(supportsPushNotifications)); dispatch(setBrowserSupport(supportsPushNotifications));
const me = getState().getIn(['meta', 'me']); const me = getState().getIn(['meta', 'me']);

View file

@ -1,4 +1,4 @@
import { register as registerPushNotifications } from './actions/push_notifications'; import * as registerPushNotifications from './actions/push_notifications';
import { default as Mastodon, store } from './containers/mastodon'; import { default as Mastodon, store } from './containers/mastodon';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';