fix: 修改为先更新hash再上报更新
This commit is contained in:
parent
16221eb821
commit
527998db49
@ -61,6 +61,7 @@ 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 {
|
if items[0].Hash != group.LastItemHash {
|
||||||
|
db.Model(&group).Update("last_item_hash", items[0].Hash)
|
||||||
action.ActionManager.SendMsg(&model.Reply{
|
action.ActionManager.SendMsg(&model.Reply{
|
||||||
FromMsg: model.Message{
|
FromMsg: model.Message{
|
||||||
GroupInfo: model.GroupInfo{
|
GroupInfo: model.GroupInfo{
|
||||||
@ -77,7 +78,6 @@ func CheckNewRss() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
db.Model(&group).Update("last_item_hash", items[0].Hash)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user