Fix report userId in report menu
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
parent
6e9c715980
commit
2772d72eba
@ -105,13 +105,13 @@ export class ReportMenu extends Phaser.GameObjects.DOMElement {
|
|||||||
gamePError.style.display = 'none';
|
gamePError.style.display = 'none';
|
||||||
const gameTextArea = this.getChildByID('gameReportInput') as HTMLInputElement;
|
const gameTextArea = this.getChildByID('gameReportInput') as HTMLInputElement;
|
||||||
const gameIdUserReported = this.getChildByID('idUserReported') as HTMLInputElement;
|
const gameIdUserReported = this.getChildByID('idUserReported') as HTMLInputElement;
|
||||||
if(!gameTextArea || !gameTextArea.value || !gameIdUserReported || !gameIdUserReported.value){
|
if(!gameTextArea || !gameTextArea.value ){
|
||||||
gamePError.innerText = 'Report message cannot to be empty.';
|
gamePError.innerText = 'Report message cannot to be empty.';
|
||||||
gamePError.style.display = 'block';
|
gamePError.style.display = 'block';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gameManager.getCurrentGameScene(this.scene).connection.emitReportPlayerMessage(
|
gameManager.getCurrentGameScene(this.scene).connection.emitReportPlayerMessage(
|
||||||
parseInt(gameIdUserReported.value),
|
this.userId,
|
||||||
gameTextArea.value
|
gameTextArea.value
|
||||||
);
|
);
|
||||||
this.close();
|
this.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user