diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-19 03:11:50 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-19 03:11:50 +0900 |
| commit | a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8 (patch) | |
| tree | 9c7190e05fe0ffe085646cd194c6c65d47375f83 /packages/backend/src/core/CreateNotificationService.ts | |
| parent | revert (diff) | |
| download | sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.tar.gz sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.tar.bz2 sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.zip | |
test
Diffstat (limited to 'packages/backend/src/core/CreateNotificationService.ts')
| -rw-r--r-- | packages/backend/src/core/CreateNotificationService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/CreateNotificationService.ts b/packages/backend/src/core/CreateNotificationService.ts index 10aa2c5df5..525fac6d92 100644 --- a/packages/backend/src/core/CreateNotificationService.ts +++ b/packages/backend/src/core/CreateNotificationService.ts @@ -78,8 +78,8 @@ export class CreateNotificationService { this.globalEventServie.publishMainStream(notifieeId, 'unreadNotification', packed); this.pushNotificationService.pushNotification(notifieeId, 'notification', packed); - if (type === 'follow') this.#emailNotificationFollow(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! })); - if (type === 'receiveFollowRequest') this.#emailNotificationReceiveFollowRequest(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! })); + if (type === 'follow') this.emailNotificationFollow(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! })); + if (type === 'receiveFollowRequest') this.emailNotificationReceiveFollowRequest(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! })); }, 2000); return notification; @@ -90,7 +90,7 @@ export class CreateNotificationService { // TODO: locale ファイルをクライアント用とサーバー用で分けたい - async #emailNotificationFollow(userId: User['id'], follower: User) { + private async emailNotificationFollow(userId: User['id'], follower: User) { /* const userProfile = await UserProfiles.findOneByOrFail({ userId: userId }); if (!userProfile.email || !userProfile.emailNotificationTypes.includes('follow')) return; @@ -101,7 +101,7 @@ export class CreateNotificationService { */ } - async #emailNotificationReceiveFollowRequest(userId: User['id'], follower: User) { + private async emailNotificationReceiveFollowRequest(userId: User['id'], follower: User) { /* const userProfile = await UserProfiles.findOneByOrFail({ userId: userId }); if (!userProfile.email || !userProfile.emailNotificationTypes.includes('receiveFollowRequest')) return; |