mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
企业微信有长度限制,超长的进行分段提交 (#2255)
This commit is contained in:
parent
11c789c71c
commit
f07093d29f
|
@ -816,7 +816,18 @@ function ChangeUserId(desp) {
|
|||
}
|
||||
}
|
||||
|
||||
function qywxamNotify(text, desp) {
|
||||
async function qywxamNotify(text, desp) {
|
||||
const MAX_LENGTH = 900;
|
||||
if (desp.length > MAX_LENGTH) {
|
||||
let d = desp.substr(0, MAX_LENGTH) + "\n==More==";
|
||||
await do_qywxamNotify(text, d);
|
||||
await qywxamNotify(text, desp.substr(MAX_LENGTH));
|
||||
} else {
|
||||
return await do_qywxamNotify(text,desp);
|
||||
}
|
||||
}
|
||||
|
||||
function do_qywxamNotify(text, desp) {
|
||||
return new Promise((resolve) => {
|
||||
if (QYWX_AM) {
|
||||
const QYWX_AM_AY = QYWX_AM.split(',');
|
||||
|
|
Loading…
Reference in New Issue
Block a user