mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Feature/tinder (#179)
* basic framework for match/tinder * working version of swiping * working version of profile editing * introducing backend * working matching system * working profile updating * fix all linting issues * updated events to Enum * working profile generation * documentation updates * general PR feedback * working profile loading, matches show matchedAt * slight modification to event strings * added sql imports
This commit is contained in:
46 files changed
+1932
-49
No files matched your search
@@ -104,11 +104,14 @@ async function getCleanedPlayerInfo(identifier: string): Promise<PlayerQueryResp
|
||||
* Generate a profile name by the player's name and/or phone number
|
||||
* @param identifier - player's identifier
|
||||
*/
|
||||
export async function generateProfileName(identifier: string): Promise<string | null> {
|
||||
export async function generateProfileName(
|
||||
identifier: string,
|
||||
delimiter: string = '_',
|
||||
): Promise<string | null> {
|
||||
const { firstname, lastname, phone_number } = await getCleanedPlayerInfo(identifier);
|
||||
|
||||
if (firstname && lastname) {
|
||||
return `${firstname}_${lastname}`;
|
||||
return `${firstname}${delimiter}${lastname}`;
|
||||
} else if (firstname) {
|
||||
return firstname;
|
||||
} else if (lastname) {
|
||||
|
||||
Reference in new issue
Block a user