0
Good afternoon Developers community.... difficulty recording using firebase...
firebase cloud functions console gives this error message:
decode64(userTo) ********@gmail.com
decode64(userFrom) YWRyaWVsQHVuaXBsYWNsYWdlcy5lZHUuYnI=
Uncaught exception
ReferenceError: ut is not defined
my code is like this:
let ut = decode64(userTo)
let uf = encode64(userFrom)
console.log('decode64(userTo)', ut)
console.log('encode64(userFrom)', uf)
db.collection('users').doc(ut).collection('contacts').doc(uf).set({
lastMessage: messageDoc.content,
lastMessageTime: new Date()
}, {
merge: true
}).then(() => {
console.log('[END]');
resolve(true);
return true;
}).catch(e => {
throw new Error("User last message not saved.");
});
thank you in advance...