Skip to content

Commit

Permalink
feat: 再次尝试防止重复推送体力
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyJan committed Jul 7, 2024
1 parent 9ecb82e commit 8c30ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/gameEnergy.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ export async function doEnergyPush(
)
return false
}
user.saveEnergyLastPushTime(uin, gameId, gameUid, Date.now())

let pushMsg = apiDataIsFull
? `未知的游戏 ${gameId} UID ${gameUid} 的体力恢复啦 (${energy}/${energyMax}) ~`
: `未知的游戏 ${gameId} UID ${gameUid} 的体力此时应已恢复, 但可能由于缓存问题接口返回未恢复 (${energy}/${energyMax}) ~`
Expand All @@ -361,7 +363,5 @@ export async function doEnergyPush(

await sendMsgFriend(uin, pushMsg)

await user.saveEnergyLastPushTime(uin, gameId, gameUid, Date.now())

return true
}

0 comments on commit 8c30ad6

Please sign in to comment.