v1.6.0/brand new chat ui

This commit is contained in:
2020-08-03 18:05:08 -04:00
parent 3e7494aef4
commit 9d0cb56cda
6 changed files with 1486 additions and 436 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
const admin = require('firebase-admin');
module.exports = async (req, res) => {
const { name, text, uid, roomId, type } = JSON.parse(req.body);
const { name, text, uid, roomId, type, replyTo } = JSON.parse(req.body);
const roomExists = await admin
.firestore()
@@ -21,6 +21,7 @@ module.exports = async (req, res) => {
time: new Date(),
uid,
type: type || '',
replyTo: replyTo || null,
})
.catch((err) => {
console.error(`Failed to send message to party : \n\t Room: ${roomId} \n\t ${uid}`, err);