summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NotificationService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-04-14 13:50:05 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-04-14 13:50:05 +0900
commita67439981b009410160b2d428aa83b5411241907 (patch)
tree21ee6a611b820979478b26672ba2aa5e0088cfa5 /packages/backend/src/core/NotificationService.ts
parentupdate ioredis 5.x (diff)
downloadsharkey-a67439981b009410160b2d428aa83b5411241907.tar.gz
sharkey-a67439981b009410160b2d428aa83b5411241907.tar.bz2
sharkey-a67439981b009410160b2d428aa83b5411241907.zip
fix types
Diffstat (limited to 'packages/backend/src/core/NotificationService.ts')
-rw-r--r--packages/backend/src/core/NotificationService.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts
index 6691c42836..a245908c98 100644
--- a/packages/backend/src/core/NotificationService.ts
+++ b/packages/backend/src/core/NotificationService.ts
@@ -1,5 +1,5 @@
import { setTimeout } from 'node:timers/promises';
-import Redis from 'ioredis';
+import * as Redis from 'ioredis';
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
@@ -111,7 +111,7 @@ export class NotificationService implements OnApplicationShutdown {
// 2秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する
setTimeout(2000, 'unread notification', { signal: this.#shutdownController.signal }).then(async () => {
const latestReadNotificationId = await this.redisClient.get(`latestReadNotification:${notifieeId}`);
- if (latestReadNotificationId && (latestReadNotificationId >= await redisIdPromise)) return;
+ if (latestReadNotificationId && (latestReadNotificationId >= (await redisIdPromise)!)) return;
this.globalEventService.publishMainStream(notifieeId, 'unreadNotification', packed);
this.pushNotificationService.pushNotification(notifieeId, 'notification', packed);