Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuschelCGN authored Mar 30, 2024
1 parent 50e0bb1 commit cc5bb35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ async function processOne(hook) {
const incidentExpiration = hook.message.incident_expiration ?? hook.message.incident_expire_timestamp
const lureExpiration = hook.message.lure_expiration
const incidentConfirmed = hook.message.confirmed
const incidentDisplayType = hook.message.display_type
if (!lureExpiration && !incidentExpiration) {
fastify.controllerLog.debug(`${hook.message.pokestop_id}: Pokestop received but no invasion or lure information, ignoring`)
break
Expand All @@ -630,7 +631,7 @@ async function processOne(hook) {
}
}

if (incidentExpiration && !config.general.disableInvasion && !config.general.disableNotConfirmedInvasion) {
if (incidentExpiration && !config.general.disableInvasion && (!config.general.disableNotConfirmedInvasion || incidentDisplayType < '7')) {
const cacheKey = `${hook.message.pokestop_id}I${incidentExpiration}`

if (fastify.cache.get(cacheKey) && !hook.message.poracleTest) {
Expand Down

0 comments on commit cc5bb35

Please sign in to comment.