(client: any, peer: string, msg: Api.Message, target: SignTarget)
| 492 | const summary = `🤖 <b>CheckIn 签到汇总报告</b>\n时间: ${new Date().toLocaleString("zh-CN", { timeZone: SH_TZ })}\n来源: ${this.escape(source)}\n结果: ${ok} 成功 / ${fail} 失败\n\n${lines}`; |
| 493 | |
| 494 | let sent = false; |
| 495 | if (conf.botToken && conf.pushChatId) { |
| 496 | try { |
| 497 | await this.sendViaBot(conf.botToken, conf.pushChatId, summary); |
| 498 | sent = true; |
| 499 | } catch (e) { |
| 500 | console.error("[CheckIn] Bot push failed:", e); |
| 501 | } |
| 502 | } |
| 503 | if (!sent) { |
| 504 | const peer = conf.logChat || fallbackPeer; |
| 505 | if (peer) { |
| 506 | try { |
| 507 | await client.sendMessage(peer, { message: summary, parseMode: "html", linkPreview: false }); |
no test coverage detected