summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NotificationService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-03 20:26:11 +0900
committerMar0xy <marie@kaifa.ch>2023-10-13 17:58:11 +0200
commitf6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d (patch)
treed3c10281ce2bfee3f79162f658565c28c64c1bbf /packages/backend/src/core/NotificationService.ts
parentupd: delete reactions properly in the DB (diff)
downloadsharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.gz
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.bz2
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.zip
merge: timeline 1
Diffstat (limited to 'packages/backend/src/core/NotificationService.ts')
-rw-r--r--packages/backend/src/core/NotificationService.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts
index ca05989a4a..32d54d2576 100644
--- a/packages/backend/src/core/NotificationService.ts
+++ b/packages/backend/src/core/NotificationService.ts
@@ -99,19 +99,19 @@ export class NotificationService implements OnApplicationShutdown {
}
if (recieveConfig?.type === 'following') {
- const isFollowing = await this.cacheService.userFollowingsCache.fetch(notifieeId).then(followings => followings.has(notifierId));
+ const isFollowing = await this.cacheService.userFollowingsCache.fetch(notifieeId).then(followings => Object.hasOwn(followings, notifierId));
if (!isFollowing) {
return null;
}
} else if (recieveConfig?.type === 'follower') {
- const isFollower = await this.cacheService.userFollowingsCache.fetch(notifierId).then(followings => followings.has(notifieeId));
+ const isFollower = await this.cacheService.userFollowingsCache.fetch(notifierId).then(followings => Object.hasOwn(followings, notifieeId));
if (!isFollower) {
return null;
}
} else if (recieveConfig?.type === 'mutualFollow') {
const [isFollowing, isFollower] = await Promise.all([
- this.cacheService.userFollowingsCache.fetch(notifieeId).then(followings => followings.has(notifierId)),
- this.cacheService.userFollowingsCache.fetch(notifierId).then(followings => followings.has(notifieeId)),
+ this.cacheService.userFollowingsCache.fetch(notifieeId).then(followings => Object.hasOwn(followings, notifierId)),
+ this.cacheService.userFollowingsCache.fetch(notifierId).then(followings => Object.hasOwn(followings, notifieeId)),
]);
if (!isFollowing && !isFollower) {
return null;