feat: 支持一次输出同一个rss 5min 内的多个消息
This commit is contained in:
parent
3299e0a3bf
commit
94beb84d6d
@ -60,8 +60,9 @@ func CheckNewRss() {
|
|||||||
}
|
}
|
||||||
//比较最新的rss数据与订阅信息中的last_item_hash,若有更新则向对应群发送消息,并更新订阅信息中的last_item_hash
|
//比较最新的rss数据与订阅信息中的last_item_hash,若有更新则向对应群发送消息,并更新订阅信息中的last_item_hash
|
||||||
log.Println("localHash:", group.LastItemHash, "remoteHash:", items[0].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)
|
db.Model(&group).Update("last_item_hash", items[0].Hash)
|
||||||
|
for _, item := range items {
|
||||||
|
if item.Hash != group.LastItemHash {
|
||||||
action.ActionManager.SendMsg(&model.Reply{
|
action.ActionManager.SendMsg(&model.Reply{
|
||||||
FromMsg: model.Message{
|
FromMsg: model.Message{
|
||||||
GroupInfo: model.GroupInfo{
|
GroupInfo: model.GroupInfo{
|
||||||
@ -78,6 +79,9 @@ func CheckNewRss() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user