Commit 401634eb authored by Him188's avatar Him188

Add a configuration `logPreviousMessages`

parent f4f7e5f6
......@@ -226,7 +226,9 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
return
if (!packet::class.annotations.filterIsInstance<NoLog>().any()) {
bot.logger.verbose("Packet received: $packet")
if ((packet as? BroadcastControllable)?.shouldBroadcast != false) {
bot.logger.verbose("Packet received: $packet")
}
}
when (packet) {
......
......@@ -62,6 +62,12 @@ class BotConfiguration : CoroutineContext.Element {
* 验证码处理器
*/
var captchaSolver: CaptchaSolver = DefaultCaptchaSolver
/**
* 登录完成后几秒会收到好友消息的历史记录,
* 这些历史记录不会触发事件.
* 这个选项为是否把这些记录添加到日志
*/
var logPreviousMessages: Boolean = false
companion object Key : CoroutineContext.Key<BotConfiguration> {
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment