feat: 支持一次输出同一个rss 5min 内的多个消息

This commit is contained in:
lixiangwuxian 2025-08-08 18:16:05 +08:00
parent 3299e0a3bf
commit 94beb84d6d

View File

@ -60,8 +60,9 @@ func CheckNewRss() {
}
//比较最新的rss数据与订阅信息中的last_item_hash若有更新则向对应群发送消息并更新订阅信息中的last_item_hash
log.Println("localHash:", group.LastItemHash, "remoteHash:", items[0].Hash)
if items[0].Hash != group.LastItemHash {
db.Model(&group).Update("last_item_hash", items[0].Hash)
for _, item := range items {
if item.Hash != group.LastItemHash {
action.ActionManager.SendMsg(&model.Reply{
FromMsg: model.Message{
GroupInfo: model.GroupInfo{
@ -78,6 +79,9 @@ func CheckNewRss() {
},
},
})
} else {
break
}
}
}
}