]> cat aescling's git repositories - mastodon.git/commitdiff
Fix a problem about generating an url of notifications (#8758)
authorGenbu Hase <hasegenbu@gmail.com>
Mon, 24 Sep 2018 03:45:58 +0000 (12:45 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 24 Sep 2018 03:45:58 +0000 (05:45 +0200)
app/javascript/mastodon/service_worker/web_push_notifications.js

index d61d916b199a8e68242405964095e9f2c68ebbef..80a4fb3299be773b64ea179dbe50f4acd9abd663 100644 (file)
@@ -168,7 +168,7 @@ const openUrl = url =>
 
       if (webClients.length !== 0) {
         const client       = findBestClient(webClients);
-        const { pathname } = new URL(url);
+        const { pathname } = new URL(url, self.location);
 
         if (pathname.startsWith('/web/')) {
           return client.focus().then(client => client.postMessage({