Skip to content

Commit

Permalink
防止短消息风控误报
Browse files Browse the repository at this point in the history
  • Loading branch information
takayama-lily committed Jun 4, 2021
1 parent 9b1ee69 commit 7db15e9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/message/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,11 @@ class Builder {
*/
reply = undefined;

/**
* 连续节点数量
* @private
*/
length = 0;

/**
* 文本长度
* @private
*/
size = 0;
length = 0;

/**
* 异步任务
Expand Down Expand Up @@ -979,7 +973,7 @@ class Builder {
message_id = genC2CMessageId(this.target, this.seq, this.random, rsp[3], 1);
}
if (this.type === 1 && !message_id) { //群聊
message_id = await this.waitForMessageId(this.c.config.resend ? 500 : 5000);
message_id = await this.waitForMessageId((this.c.config.resend && this.length > 80) ? 500 : 5000);
if (!message_id) {
if (this.length <= 80) {
const emsg = "群消息可能发送失败,请检查消息内容。";
Expand Down

0 comments on commit 7db15e9

Please sign in to comment.