diff --git a/functions/index.js b/functions/index.js index 63f2945ec..30cf5c654 100644 --- a/functions/index.js +++ b/functions/index.js @@ -150,7 +150,7 @@ exports.changeDisplayName = functions.https.onCall( await db .collection("users") .doc(request.uid) - .update({ name: request.name }); + .set({ name: request.name }, { merge: true }); await db.collection("takenNames").doc(request.name.toLowerCase()).set( { taken: true, diff --git a/src/js/account.js b/src/js/account.js index 7d4cdbcd3..a28c6f803 100644 --- a/src/js/account.js +++ b/src/js/account.js @@ -323,7 +323,7 @@ function getAccountDataAndInit() { db_updateName(user.uid, user.displayName); } else { //invalid, get new - Notifications.add("Invalid name", 0); + // Notifications.add("Invalid name", 0); let promptVal = null; let cdnVal = undefined; @@ -340,10 +340,10 @@ function getAccountDataAndInit() { name: promptVal, }); if (cdnVal.data.status === 1) { - Notifications.add("Name updated", 1); + alert("Name updated", 1); location.reload(); } else if (cdnVal.data.status < 0) { - Notifications.add(cdnVal.data.message, 0); + alert(cdnVal.data.message, 0); } } }