Change how MPP service sends chat messages
This commit is contained in:
parent
1300babfde
commit
0780213aa1
|
@ -73,16 +73,21 @@ export class MPPAgent extends ServiceAgent<Client> {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (str) {
|
if (str) {
|
||||||
if (str.includes("\n")) {
|
this.logger.debug(str);
|
||||||
let sp = str.split("\n");
|
if (typeof str == "string") {
|
||||||
|
if (str.includes("\n")) {
|
||||||
|
let sp = str.split("\n");
|
||||||
|
|
||||||
for (const s of sp) {
|
for (const s of sp) {
|
||||||
this.client.sendArray([
|
this.client.sendArray([
|
||||||
{
|
{
|
||||||
m: "a",
|
m: "a",
|
||||||
message: `\u034f${s}`
|
message: `\u034f${s}`
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.emit("send chat", str);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.emit("send chat", str);
|
this.emit("send chat", str);
|
||||||
|
|
Loading…
Reference in New Issue