summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/CreateNotificationService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-12-04 15:03:09 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-12-04 15:03:09 +0900
commitbbb49457f9fb5d46402e913c92ebf77722cad6ff (patch)
tree8ef285bcbab2c3a4a89d0a624a802d76a2864fed /packages/backend/src/core/CreateNotificationService.ts
parent:art: (diff)
downloadsharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.gz
sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.bz2
sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.zip
refactor: introduce bindThis decorator to bind this automaticaly
Diffstat (limited to 'packages/backend/src/core/CreateNotificationService.ts')
-rw-r--r--packages/backend/src/core/CreateNotificationService.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/core/CreateNotificationService.ts b/packages/backend/src/core/CreateNotificationService.ts
index 504661c3bd..f376b7b9cf 100644
--- a/packages/backend/src/core/CreateNotificationService.ts
+++ b/packages/backend/src/core/CreateNotificationService.ts
@@ -7,6 +7,7 @@ import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { NotificationEntityService } from '@/core/entities/NotificationEntityService.js';
import { PushNotificationService } from '@/core/PushNotificationService.js';
+import { bindThis } from '@/decorators.js';
@Injectable()
export class CreateNotificationService {
@@ -30,6 +31,7 @@ export class CreateNotificationService {
) {
}
+ @bindThis
public async createNotification(
notifieeId: User['id'],
type: Notification['type'],
@@ -90,6 +92,7 @@ export class CreateNotificationService {
// TODO: locale ファイルをクライアント用とサーバー用で分けたい
+ @bindThis
private async emailNotificationFollow(userId: User['id'], follower: User) {
/*
const userProfile = await UserProfiles.findOneByOrFail({ userId: userId });
@@ -101,6 +104,7 @@ export class CreateNotificationService {
*/
}
+ @bindThis
private async emailNotificationReceiveFollowRequest(userId: User['id'], follower: User) {
/*
const userProfile = await UserProfiles.findOneByOrFail({ userId: userId });