Change how MPP service sends chat messages

This commit is contained in:
Hri7566 2023-12-02 19:28:05 -05:00
parent 1300babfde
commit 0780213aa1
1 changed files with 14 additions and 9 deletions

View File

@ -73,16 +73,21 @@ export class MPPAgent extends ServiceAgent<Client> {
);
if (str) {
if (str.includes("\n")) {
let sp = str.split("\n");
this.logger.debug(str);
if (typeof str == "string") {
if (str.includes("\n")) {
let sp = str.split("\n");
for (const s of sp) {
this.client.sendArray([
{
m: "a",
message: `\u034f${s}`
}
]);
for (const s of sp) {
this.client.sendArray([
{
m: "a",
message: `\u034f${s}`
}
]);
}
} else {
this.emit("send chat", str);
}
} else {
this.emit("send chat", str);