v1.6.0/api2 update player hotfix
This commit is contained in:
@@ -32,18 +32,18 @@ module.exports = async (req, res) => {
|
|||||||
.then((userSnap) => userSnap.exists);
|
.then((userSnap) => userSnap.exists);
|
||||||
if (userExists) {
|
if (userExists) {
|
||||||
if (showChanged === true && player.showName) {
|
if (showChanged === true && player.showName) {
|
||||||
if (player.showChanged !== roomData.player.showName) {
|
if (player.showName !== roomData.player.showName) {
|
||||||
await admin
|
await admin
|
||||||
.firestore()
|
.firestore()
|
||||||
.collection('rooms')
|
.collection('rooms')
|
||||||
.doc(roomId)
|
.doc(roomId)
|
||||||
.collection('messages')
|
.collection('messages')
|
||||||
.add({
|
.add({
|
||||||
uid: '<system>',
|
uid: '<system>',
|
||||||
name: '',
|
name: '',
|
||||||
text: `${userName} changed \n${player.showName ? 'to ' + player.showName : ''}`,
|
text: `${userName} changed \n${player.showName ? 'to ' + player.showName : ''}`,
|
||||||
time: new Date(),
|
time: new Date(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (roomData.status !== player.status) {
|
if (roomData.status !== player.status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user