limit amount lines sent from natrix to 4
This commit is contained in:
parent
b66e2ba839
commit
a7619c447f
|
@ -201,15 +201,18 @@ class PPfunMatrixBridge {
|
|||
return;
|
||||
}
|
||||
console.log(`MATRIX ${name}: ${msg}`);
|
||||
msg.split('\n').forEach((part) => {
|
||||
let msgLine = part;
|
||||
while (msgLine.length > 190) {
|
||||
const msgPart = msgLine.slice(0, 190);
|
||||
msgLine = msgLine.slice(190);
|
||||
this.sendPPfun(name, parseInt(uid, 10), msgPart, cid);
|
||||
}
|
||||
this.sendPPfun(name, parseInt(uid, 10), msgLine, cid);
|
||||
})
|
||||
msg.split('\n')
|
||||
.slice(0, 5)
|
||||
.filter((msg) => msg.trim() !== '')
|
||||
.forEach((part) => {
|
||||
let msgLine = part;
|
||||
while (msgLine.length > 190) {
|
||||
const msgPart = msgLine.slice(0, 190);
|
||||
msgLine = msgLine.slice(190);
|
||||
this.sendPPfun(name, parseInt(uid, 10), msgPart, cid);
|
||||
}
|
||||
this.sendPPfun(name, parseInt(uid, 10), msgLine, cid);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user