update dependencies and bump version
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
// Get these values for your project from the https://console.firebase.google.com/
|
||||
// You can get most of this file at
|
||||
// Project Settings -> General -> Your Apps -> [Add app] -> [Add Firebase to your Web app]
|
||||
// The `messagingVapidKey` needs to be added separately.
|
||||
const FIREBASE_INIT = {
|
||||
// Project Settings -> Cloud Messaging, "Sender ID".
|
||||
messagingSenderId: "114126160546",
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tinode-webapp",
|
||||
"description": "Tinode messenger for the web",
|
||||
"version": "0.15.6",
|
||||
"version": "0.15.7-rc1",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
@@ -66,8 +66,8 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"firebase": "^5.5.0",
|
||||
"react": "^16.5.1",
|
||||
"react-dom": "^16.4.2",
|
||||
"react": "^16.5.2",
|
||||
"react-dom": "^16.5.2",
|
||||
"tinode-sdk": "^0.15.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4980,7 +4980,6 @@ class TinodeWeb extends React.Component {
|
||||
if (enabled) {
|
||||
if (!this.state.firebaseToken) {
|
||||
this.fbPush.requestPermission().then(() => {
|
||||
console.log("got permission, requesting token");
|
||||
this.requestPushToken(true);
|
||||
}).catch((err) => {
|
||||
this.handleError(err.message, "err");
|
||||
@@ -5007,9 +5006,7 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
|
||||
requestPushToken(sendToServer) {
|
||||
console.log("requestPushToken", sendToServer);
|
||||
this.fbPush.getToken().then((refreshedToken) => {
|
||||
console.log("got token", refreshedToken, this.state.firebaseToken);
|
||||
if (refreshedToken != this.state.firebaseToken) {
|
||||
this.tinode.setDeviceToken(refreshedToken, sendToServer);
|
||||
localStorage.setObject("firebase-token", refreshedToken);
|
||||
|
||||
+4609
-3424
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