We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a0bf61 commit 2c1db6bCopy full SHA for 2c1db6b
examples/ding-dong-bot.ts
@@ -84,6 +84,8 @@ async function 查询信息 (msgText: string, msg: Message) {
84
const talkContact = msg.talker()
85
const listenerContact = msg.listener()
86
const room = msg.room()
87
+ logTextList.push(`date: ${msg.date()}`)
88
+ logTextList.push(`age: ${msg.age()}`)
89
if (room) {
90
logTextList.push(`room id: ${room.id}`)
91
logTextList.push(`room topic: ${await room.topic()}`)
@@ -115,7 +117,8 @@ async function onMessage (msg: Message) {
115
117
}
116
118
119
// 跳过近期的消息(重启服务,会把近期消息重新走一遍……)
- if (msg.age() > 60) {
120
+ // 为什么是180: massage存活180秒后换新,所以实时消息age上限是180
121
+ if (msg.age() > 180) {
122
return
123
124
0 commit comments