feat(player/npwd): Update identifier & name

Still need to include a public facing phone number update
This commit is contained in:
Taso committed 2021-04-19 14:14:24 -04:00
1 parent 3e01fc456c
commit 6be602c95b
4 files changed
+93 -18

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ export const getSource = () => (global as any).source;
* @param source The source/netId for the player in question
**/
export function getIdentifier(source: number): string {
return getPlayer(source).identifier;
return getPlayer(source).getIdentifier();
}
/**
@@ -31,7 +31,7 @@ export async function getIdentifierByPhoneNumber(
fetch?: boolean,
): Promise<string | null> {
for (const [source, player] of Players) {
if (player.getPhoneNumber() === phoneNumber) return player.identifier;
if (player.getPhoneNumber() === phoneNumber) return player.getIdentifier();
}
// Whether we fetch from database if not found in online players
if (fetch) {