From aa9b805e5609ede6994da5bf79369c3157b54385 Mon Sep 17 00:00:00 2001 From: Ayushya Amitabh Date: Fri, 24 Apr 2020 14:07:57 -0400 Subject: [PATCH] v1.0.2 - giphy message type integration fix --- functions/firebase-debug.log | 143 +++++++++++++++++++++++++++++++++++ functions/index.js | 4 +- public/manifest.json | 2 +- src/Chat.js | 2 +- 4 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 functions/firebase-debug.log diff --git a/functions/firebase-debug.log b/functions/firebase-debug.log new file mode 100644 index 0000000..bc00235 --- /dev/null +++ b/functions/firebase-debug.log @@ -0,0 +1,143 @@ +[debug] [2020-04-24T18:07:31.093Z] ---------------------------------------------------------------------- +[debug] [2020-04-24T18:07:31.096Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --only functions +[debug] [2020-04-24T18:07:31.096Z] CLI Version: 7.14.0 +[debug] [2020-04-24T18:07:31.096Z] Platform: darwin +[debug] [2020-04-24T18:07:31.096Z] Node Version: v12.16.1 +[debug] [2020-04-24T18:07:31.097Z] Time: Fri Apr 24 2020 14:07:31 GMT-0400 (Eastern Daylight Time) +[debug] [2020-04-24T18:07:31.097Z] ---------------------------------------------------------------------- +[debug] [2020-04-24T18:07:31.097Z] +[debug] [2020-04-24T18:07:31.114Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] +[debug] [2020-04-24T18:07:31.115Z] > authorizing via signed-in user +[debug] [2020-04-24T18:07:31.115Z] [iam] checking project watch-party-crx for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"] +[debug] [2020-04-24T18:07:31.117Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"] +[debug] [2020-04-24T18:07:31.117Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token + +[debug] [2020-04-24T18:07:31.283Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:31.289Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/watch-party-crx:testIamPermissions + +[debug] [2020-04-24T18:07:31.524Z] <<< HTTP RESPONSE 200 +[info] +[info] === Deploying to 'watch-party-crx'... +[info] +[info] i deploying functions +[info] Running command: npm --prefix "$RESOURCE_DIR" run lint +[info] ✔ functions: Finished running predeploy script. +[debug] [2020-04-24T18:07:36.485Z] > [functions] package.json contents: { + "name": "watchparty", + "version": "1.0.0-beta", + "description": "Cloud Functions for Watch Party", + "scripts": { + "lint": "eslint .", + "serve": "firebase emulators:start --only functions", + "shell": "firebase functions:shell", + "start": "npm run shell", + "deploy": "firebase deploy --only functions", + "logs": "firebase functions:log" + }, + "engines": { + "node": "8" + }, + "dependencies": { + "cors": "^2.8.5", + "express": "^4.17.1", + "firebase-admin": "^8.6.0", + "firebase-functions": "^3.3.0" + }, + "devDependencies": { + "eslint": "^5.12.0", + "eslint-plugin-promise": "^4.0.1", + "firebase-functions-test": "^0.1.6" + }, + "private": true +} +[info] i functions: ensuring necessary APIs are enabled... +[debug] [2020-04-24T18:07:36.486Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/watch-party-crx/services/cloudfunctions.googleapis.com + +[debug] [2020-04-24T18:07:36.486Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/watch-party-crx/services/runtimeconfig.googleapis.com + +[debug] [2020-04-24T18:07:36.867Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:36.871Z] <<< HTTP RESPONSE 200 +[info] ✔ functions: all necessary APIs are enabled +[debug] [2020-04-24T18:07:36.872Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/watch-party-crx/adminSdkConfig + +[debug] [2020-04-24T18:07:37.113Z] <<< HTTP RESPONSE 200 +[info] i functions: preparing functions directory for uploading... +[debug] [2020-04-24T18:07:37.116Z] >>> HTTP REQUEST GET https://runtimeconfig.googleapis.com/v1beta1/projects/watch-party-crx/configs + +[debug] [2020-04-24T18:07:37.320Z] <<< HTTP RESPONSE 200 +[info] i functions: packaged functions (44.76 KB) for uploading +[debug] [2020-04-24T18:07:37.658Z] >>> HTTP REQUEST POST https://cloudfunctions.googleapis.com/v1/projects/watch-party-crx/locations/us-central1/functions:generateUploadUrl + +[debug] [2020-04-24T18:07:38.546Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:38.546Z] >>> HTTP REQUEST PUT https://storage.googleapis.com/gcf-upload-us-central1-a4ea9772-3dd8-4303-8415-cd76dd6c16e9/921c6289-5681-487f-b045-33da931235ac.zip?GoogleAccessId=service-712242707190@gcf-admin-robot.iam.gserviceaccount.com&Expires=1587753458&Signature=PGSCfGryU1TcJWqUQVehHtdzJ2l0s%2BXpwssevFPFQ1TbasQ3ogsBLrDxY%2B7%2FRRzDXhSQCyhDNhqbykvwyonKUvjZsCbEHxv7cS%2FLHtlsSnz%2F3R6aBZVgaT6L8fYlMiSHehf5WUiOlRT7rcORQsiCBIZN582fP5HlTJq8A5Utrrg1cYyAZSYmDuUBdk9ijh1mYVx8MacUtGDVIUVj4xguN%2FJvh47tzaT1tS34YSi3%2BzrnuMKyenHEYToiDPuaDWjl%2BlcWpfU8EQWwB3qiZ01UP2DkprngrfmHPzuPT%2BmdWqb6L6cJKMvgfM%2B%2Fu8BdRHQFQQRNg9AZl6%2FZWSUZCk1D7Q%3D%3D + +[debug] [2020-04-24T18:07:38.778Z] <<< HTTP RESPONSE 200 +[info] ✔ functions: functions folder uploaded successfully +[debug] [2020-04-24T18:07:38.780Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/projects/watch-party-crx/locations/-/functions + +[debug] [2020-04-24T18:07:39.306Z] <<< HTTP RESPONSE 200 +[info] i functions: updating Node.js 8 function widgets(us-central1)... +[debug] [2020-04-24T18:07:39.308Z] Trigger is: {"httpsTrigger":{}} +[info] i functions: updating Node.js 8 function scheduledCleanUp(us-central1)... +[debug] [2020-04-24T18:07:39.308Z] Trigger is: {"eventTrigger":{"resource":"projects/watch-party-crx/topics/firebase-schedule-scheduledCleanUp-us-central1","eventType":"google.pubsub.topic.publish","service":"pubsub.googleapis.com"}} +[info] i scheduler: ensuring necessary APIs are enabled... +[info] i pubsub: ensuring necessary APIs are enabled... +[debug] [2020-04-24T18:07:39.310Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/watch-party-crx/services/cloudscheduler.googleapis.com + +[debug] [2020-04-24T18:07:39.310Z] >>> HTTP REQUEST GET https://serviceusage.googleapis.com/v1/projects/watch-party-crx/services/pubsub.googleapis.com + +[debug] [2020-04-24T18:07:39.796Z] <<< HTTP RESPONSE 200 +[info] ✔ pubsub: all necessary APIs are enabled +[debug] [2020-04-24T18:07:40.006Z] <<< HTTP RESPONSE 200 +[info] ✔ scheduler: all necessary APIs are enabled +[debug] [2020-04-24T18:07:40.008Z] >>> HTTP REQUEST GET https://cloudscheduler.googleapis.com/v1beta1/projects/watch-party-crx/locations/us-central1/jobs/firebase-schedule-scheduledCleanUp-us-central1 + +[debug] [2020-04-24T18:07:40.399Z] <<< HTTP RESPONSE 200 +[info] i functions: scheduler job firebase-schedule-scheduledCleanUp-us-central1 is up to date, no changes required +[debug] [2020-04-24T18:07:40.401Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/watch-party-crx/locations/us-central1/functions/widgets {"updateMask":"sourceUploadUrl,name,labels,runtime,httpsTrigger"} + +[debug] [2020-04-24T18:07:40.402Z] >>> HTTP REQUEST PATCH https://cloudfunctions.googleapis.com/v1/projects/watch-party-crx/locations/us-central1/functions/scheduledCleanUp {"updateMask":"sourceUploadUrl,name,labels,runtime,eventTrigger.resource,eventTrigger.eventType,eventTrigger.service"} + +[debug] [2020-04-24T18:07:41.048Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:41.069Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:41.070Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/projects/watch-party-crx/locations/-/functions + +[debug] [2020-04-24T18:07:41.567Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:41.568Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:41.569Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:41.934Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:41.944Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:43.935Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:43.946Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:44.320Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:44.321Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:46.322Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:46.322Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:46.659Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:46.689Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:48.661Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:48.692Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:49.046Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:49.114Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:51.048Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:51.113Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:51.508Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:51.515Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:53.509Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + +[debug] [2020-04-24T18:07:53.517Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3NjaGVkdWxlZENsZWFuVXAvNUdFSXJmSFZKYjQ + +[debug] [2020-04-24T18:07:53.692Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:53.860Z] <<< HTTP RESPONSE 200 +[debug] [2020-04-24T18:07:55.695Z] >>> HTTP REQUEST GET https://cloudfunctions.googleapis.com/v1/operations/d2F0Y2gtcGFydHktY3J4L3VzLWNlbnRyYWwxL3dpZGdldHMvdDltZHdiLUZSWm8 + diff --git a/functions/index.js b/functions/index.js index 36afdad..d85ebea 100644 --- a/functions/index.js +++ b/functions/index.js @@ -238,10 +238,10 @@ const sendMessage = async (req, res) => { .collection('messages') .add({ name, - text, + text: text || '', time, uid, - type, + type: type || '', }) .catch((err) => { console.error(`Failed to send message to party : \n\t Room: ${roomId} \n\t ${uid}`, err); diff --git a/public/manifest.json b/public/manifest.json index 9f2851f..e4b6bc5 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "name": "Watch Party", "short_name": "WP", - "version": "1.0.1", + "version": "1.0.2", "description": "Watch streamed content together.", "background": { "page": "popup.html" diff --git a/src/Chat.js b/src/Chat.js index f14569b..dfa3639 100644 --- a/src/Chat.js +++ b/src/Chat.js @@ -189,7 +189,7 @@ export default class Chat extends Component { }); } sendMessageInvoker(overrideMessage) { - if (overrideMessage !== null) this.sendMessage(overrideMessage); + if (overrideMessage) this.sendMessage(overrideMessage); else { const trim = this.state.newMessage.replace(/^\s+|\s+$/g, ''); if (trim !== '') this.sendMessage(trim);