v1.6.0/api2 update player hotfix

This commit is contained in:
2020-08-03 11:54:28 -04:00
parent 3764a1c1dd
commit 3e7494aef4
+11 -11
View File
@@ -32,18 +32,18 @@ module.exports = async (req, res) => {
.then((userSnap) => userSnap.exists);
if (userExists) {
if (showChanged === true && player.showName) {
if (player.showChanged !== roomData.player.showName) {
if (player.showName !== roomData.player.showName) {
await admin
.firestore()
.collection('rooms')
.doc(roomId)
.collection('messages')
.add({
uid: '<system>',
name: '',
text: `${userName} changed \n${player.showName ? 'to ' + player.showName : ''}`,
time: new Date(),
});
.firestore()
.collection('rooms')
.doc(roomId)
.collection('messages')
.add({
uid: '<system>',
name: '',
text: `${userName} changed \n${player.showName ? 'to ' + player.showName : ''}`,
time: new Date(),
});
}
}
if (roomData.status !== player.status) {