Check for and remove dialogs with the key "undefined"

This commit is contained in:
Dev 2023-08-01 23:16:06 +01:00
parent 0d423d0c70
commit 831dec7e55

View File

@ -180,6 +180,8 @@ export class GameController
this.databaseServer.getTables().bots.types.usec.firstName = [pmcProfile.Info.Nickname]; this.databaseServer.getTables().bots.types.usec.firstName = [pmcProfile.Info.Nickname];
} }
} }
this.checkForAndRemoveUndefinedDialogs(fullProfile);
} }
if (this.seasonalEventService.isAutomaticEventDetectionEnabled()) if (this.seasonalEventService.isAutomaticEventDetectionEnabled())
@ -678,6 +680,19 @@ export class GameController
} }
} }
/**
* Check for a dialog with the key 'undefined', and remove it
* @param fullProfile Profile to check for dialog in
*/
protected checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void
{
const undefinedDialog = fullProfile.dialogues["undefined"];
if (undefinedDialog)
{
delete fullProfile.dialogues["undefined"];
}
}
/** /**
* Blank out the "test" mail message from prapor * Blank out the "test" mail message from prapor
*/ */