upgrade, bump version, and rebuild
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tinode-webapp",
|
"name": "tinode-webapp",
|
||||||
"description": "Tinode messenger for the web",
|
"description": "Tinode messenger for the web",
|
||||||
"version": "0.15.7-rc6",
|
"version": "0.15.7",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
@@ -66,9 +66,9 @@
|
|||||||
"author": "Tinode Authors <info@tinode.co>",
|
"author": "Tinode Authors <info@tinode.co>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"firebase": "^5.5.2",
|
"firebase": "^5.5.4",
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-dom": "^16.5.2",
|
"react-dom": "^16.5.2",
|
||||||
"tinode-sdk": "^0.15.7-rc6"
|
"tinode-sdk": "^0.15.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-5
@@ -1,6 +1,6 @@
|
|||||||
// Must be located at the root.
|
// Must be located at the root.
|
||||||
importScripts("https://unpkg.com/firebase@5.5.2/firebase-app.js");
|
importScripts("https://unpkg.com/firebase@5.5.4/firebase-app.js");
|
||||||
importScripts("https://unpkg.com/firebase@5.5.2/firebase-messaging.js");
|
importScripts("https://unpkg.com/firebase@5.5.4/firebase-messaging.js");
|
||||||
importScripts("/firebase-init.js")
|
importScripts("/firebase-init.js")
|
||||||
|
|
||||||
firebase.initializeApp(FIREBASE_INIT);
|
firebase.initializeApp(FIREBASE_INIT);
|
||||||
@@ -24,8 +24,6 @@ firebase.messaging().setBackgroundMessageHandler(function(payload) {
|
|||||||
// This code handles a click on notification: takes
|
// This code handles a click on notification: takes
|
||||||
// the user to the browser tab with the chat or opens a new tab.
|
// the user to the browser tab with the chat or opens a new tab.
|
||||||
self.addEventListener('notificationclick', function(event) {
|
self.addEventListener('notificationclick', function(event) {
|
||||||
console.log('On notification click: ', event.notification);
|
|
||||||
|
|
||||||
const notification = event.notification;
|
const notification = event.notification;
|
||||||
notification.close();
|
notification.close();
|
||||||
|
|
||||||
@@ -39,7 +37,6 @@ self.addEventListener('notificationclick', function(event) {
|
|||||||
let anyClient = null;
|
let anyClient = null;
|
||||||
for (let i = 0; i < windowClients.length; i++) {
|
for (let i = 0; i < windowClients.length; i++) {
|
||||||
const url = new URL(windowClients[i].url);
|
const url = new URL(windowClients[i].url);
|
||||||
console.log('found client with URL', url);
|
|
||||||
if (url.hash.includes(notification.data.topic)) {
|
if (url.hash.includes(notification.data.topic)) {
|
||||||
matchingClient = windowClients[i];
|
matchingClient = windowClients[i];
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user