Client-side PM Pre-processing complete.
This commit is contained in:
parent
57db26a827
commit
23ad679473
|
|
@ -108,14 +108,20 @@ class pmPanel extends panelObj{
|
||||||
//Pull current sesh from sesh list
|
//Pull current sesh from sesh list
|
||||||
const sesh = this.client.pmHandler.seshList.get(this.activeSesh);
|
const sesh = this.client.pmHandler.seshList.get(this.activeSesh);
|
||||||
|
|
||||||
//Send message out to server
|
//Preprocess message from prompt
|
||||||
this.client.pmSocket.emit("pm", {
|
const preprocessedMessage = this.client.chatBox.commandPreprocessor.preprocess(this.seshPrompt.value);
|
||||||
recipients: sesh.recipients,
|
|
||||||
msg: this.seshPrompt.value
|
|
||||||
});
|
|
||||||
|
|
||||||
//Clear our prompt
|
//If preprocessedMessage had it's send flag thrown as false
|
||||||
this.seshPrompt.value = "";
|
if(preprocessedMessage != false){
|
||||||
|
//Stick recipients into the pre-processed message
|
||||||
|
preprocessedMessage.recipients = sesh.recipients;
|
||||||
|
|
||||||
|
//Send message out to server
|
||||||
|
this.client.pmSocket.emit("pm", preprocessedMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Clear our prompt
|
||||||
|
this.seshPrompt.value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue