Skip to content

Commit

Permalink
to sort out notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCarstens committed Aug 11, 2018
1 parent a27d2e4 commit 9a1847e
Show file tree
Hide file tree
Showing 13 changed files with 996 additions and 262 deletions.
5 changes: 3 additions & 2 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"projects": {
"default": "feedlyapp-9df9a"
"default": "feedlyapp-9df9a",
"Thomax": "myapp-93470"
}
}
}
18 changes: 9 additions & 9 deletions GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>197049247480-pte881jhuqqreo10mmgo47450ubfckvc.apps.googleusercontent.com</string>
<string>412208839835-k4v5ldns137gn5i9v95qal2j0etpffhf.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.197049247480-pte881jhuqqreo10mmgo47450ubfckvc</string>
<string>com.googleusercontent.apps.412208839835-k4v5ldns137gn5i9v95qal2j0etpffhf</string>
<key>API_KEY</key>
<string>AIzaSyC6JVSL8ji4DVXzMRb1F6w10MZic_iaSu0</string>
<string>AIzaSyAik3zzg5KJb2P6TLsw1YcAtrSqkDmx2FA</string>
<key>GCM_SENDER_ID</key>
<string>197049247480</string>
<string>412208839835</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.samarthagarwal.feedly</string>
<string>com.angularfirebase.feedlyapp</string>
<key>PROJECT_ID</key>
<string>feedlyapp-9df9a</string>
<string>myapp-93470</string>
<key>STORAGE_BUCKET</key>
<string>feedlyapp-9df9a.appspot.com</string>
<string>myapp-93470.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true></true>
<key>IS_ANALYTICS_ENABLED</key>
Expand All @@ -33,8 +33,8 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:197049247480:ios:837a40b37429f47d</string>
<string>1:412208839835:ios:12eabe2529e1e258</string>
<key>DATABASE_URL</key>
<string>https://feedlyapp-9df9a.firebaseio.com</string>
<string>https://myapp-93470.firebaseio.com</string>
</dict>
</plist>
8 changes: 6 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashScreen" value="assets/images/logo.svg" />
<preference name="SplashScreenBackgroundColor" value="#000" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
Expand Down Expand Up @@ -82,7 +84,9 @@
<plugin name="cordova-plugin-ionic-webview" spec="1.1.19" />
<plugin name="cordova-plugin-ionic-keyboard" spec="2.0.5" />
<plugin name="cordova-plugin-camera" spec="~4.0.3" />
<engine name="ios" spec="4.5.4" />
<plugin name="cordova-plugin-firebase" spec="^1.0.5" />
<engine name="android" spec="~7.0.0" />
<engine name="ios" spec="4.5.4" />
<engine name="android" spec="7.0.0" />
<engine name="browser" spec="5.0.4" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
</widget>
2 changes: 0 additions & 2 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
}
30 changes: 15 additions & 15 deletions functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const sendNotification = (owner_uid, type) => {
return new Promise((resolve, reject) => {
return admin.firestore().collection("users").doc(owner_uid).get().then((doc) => {
if(doc.exists && doc.data().token){

if(type === "new_comment"){
admin.messaging().sendToDevice(doc.data().token, {
data: {
Expand All @@ -34,12 +34,12 @@ const sendNotification = (owner_uid, type) => {
reject(err)
});
}

}
})
})




}
Expand Down
62 changes: 38 additions & 24 deletions google-services.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
{
"project_info": {
"project_number": "197049247480",
"firebase_url": "https://feedlyapp-9df9a.firebaseio.com",
"project_id": "feedlyapp-9df9a",
"storage_bucket": "feedlyapp-9df9a.appspot.com"
"project_number": "412208839835",
"firebase_url": "https://myapp-93470.firebaseio.com",
"project_id": "myapp-93470",
"storage_bucket": "myapp-93470.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:197049247480:android:e3fc01e7c2026042",
"mobilesdk_app_id": "1:412208839835:android:38b33d55f1e958fc",
"android_client_info": {
"package_name": "com.samarth.feedly"
"package_name": "com.angularfirebase.dynamicsapp"
}
},
"oauth_client": [
{
"client_id": "197049247480-bvukna7n25onr6ua9i6btss7ul28l1fu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.samarth.feedly",
"certificate_hash": "2dc06eb9e644b92694635b2348a6a576fedca1cd"
}
},
{
"client_id": "197049247480-1p3d172acr19rbht1g3q06uos6mmva8g.apps.googleusercontent.com",
"client_id": "412208839835-g6bjlkhlmuu4gr3mqd7o8u2c1cq9ehhl.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAZ-ySgQVZ1E4cqed8C4RestGdTy73zKzQ"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:412208839835:android:12eabe2529e1e258",
"android_client_info": {
"package_name": "com.angularfirebase.feedlyapp"
}
},
"oauth_client": [
{
"client_id": "197049247480-1p3d172acr19rbht1g3q06uos6mmva8g.apps.googleusercontent.com",
"client_id": "412208839835-g6bjlkhlmuu4gr3mqd7o8u2c1cq9ehhl.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyC16T8soYwFgd4ZxWpeeH-yKNaFyyeX9cU"
"current_key": "AIzaSyAZ-ySgQVZ1E4cqed8C4RestGdTy73zKzQ"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "197049247480-1p3d172acr19rbht1g3q06uos6mmva8g.apps.googleusercontent.com",
"client_type": 3
}
]
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
Expand Down
5 changes: 2 additions & 3 deletions ionic.config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "Feedly",
"type": "ionic-angular",
"integrations": {
"cordova": {}
},
"app_id": ""
}
"type": "ionic-angular"
}
Loading

0 comments on commit 9a1847e

Please sign in to comment.