diff --git a/client/components/InfoSource/InfoSourceOptions.tsx b/client/components/InfoSource/InfoSourceOptions.tsx index a4520329..d01af0f0 100644 --- a/client/components/InfoSource/InfoSourceOptions.tsx +++ b/client/components/InfoSource/InfoSourceOptions.tsx @@ -54,7 +54,7 @@ export const InfoSourceOptions: React.FC = () => { Do you not want to be bothered again or should we keep searching - for alternatives? + for alternatives with search term {"'"}{game.search}{"'"}? diff --git a/notifier/src/mail-service.ts b/notifier/src/mail-service.ts index 153cfabe..a7e577a5 100644 --- a/notifier/src/mail-service.ts +++ b/notifier/src/mail-service.ts @@ -33,18 +33,17 @@ export class MailService { const game = notification.game.getEntity(); const infoSource = notification.infoSource.getEntity(); - const gameName = game.name || game.search; // We rather display the resolved name so a user can see instantly if an unrelated // game was added. const infoSourceName = infoSource.data.fullName; switch (notification.type) { case NotificationType.GameReleased: - return `${gameName} will be available today in the ${infoSource.type} store`; + return `${infoSourceName} will be available today in the ${infoSource.type} store`; case NotificationType.GameReduced: - return `${gameName} was reduced in the ${infoSource.type} store`; + return `${infoSourceName} was reduced in the ${infoSource.type} store`; case NotificationType.ReleaseDateChanged: - return `The release date of ${gameName} changed`; + return `The release date of ${infoSourceName} changed`; case NotificationType.NewStoreEntry: return `${infoSourceName} was added to the ${infoSource.type} store`; case NotificationType.NewMetacriticRating: @@ -56,7 +55,7 @@ export class MailService { case NotificationType.LeftEarlyAccess: return `${infoSourceName} left Early Access`; case NotificationType.ResolveError: - return `${gameName} could not be resolved`; + return `${game.name || game.search} could not be resolved`; } } diff --git a/notifier/src/notification-service.ts b/notifier/src/notification-service.ts index 12cc2f13..bb1914fc 100644 --- a/notifier/src/notification-service.ts +++ b/notifier/src/notification-service.ts @@ -49,6 +49,10 @@ export class NotificationService { { populate: ['game', 'user'] } ); const game = infoSource.game.getEntity(); + if (!game.setupCompleted) { + return; + } + const user = infoSource.user.getEntity(); const logger = this.sourceScopedLogger.child({ diff --git a/resolver/src/resolve-service.ts b/resolver/src/resolve-service.ts index c1dc43e9..bbc788ac 100644 --- a/resolver/src/resolve-service.ts +++ b/resolver/src/resolve-service.ts @@ -71,6 +71,12 @@ export class ResolveService { logger.debug(`Resolved source information in ${source.type}`); + await this.em.nativeUpdate(InfoSource, sourceId, { + state: InfoSourceState.Resolved, + data: resolvedGameData, + updatedAt: new Date() + }); + if (!triggeredManually) { await this.addToNotificationQueue({ sourceId, @@ -79,12 +85,6 @@ export class ResolveService { }); } - await this.em.nativeUpdate(InfoSource, sourceId, { - state: InfoSourceState.Resolved, - data: resolvedGameData, - updatedAt: new Date() - }); - // Delete old, unnecessary ResolveError notifications so that on a new error a // new notification is created. await this.em.nativeDelete(Notification, {