summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-07-25 13:28:33 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-07-25 13:28:33 +0900
commitf3b3e063293ba623446aaf1f2b90089af9fa7a21 (patch)
tree405efc38880373aafdc9af9a1876122932b3ede5 /src
parentfix bug (diff)
downloadsharkey-f3b3e063293ba623446aaf1f2b90089af9fa7a21.tar.gz
sharkey-f3b3e063293ba623446aaf1f2b90089af9fa7a21.tar.bz2
sharkey-f3b3e063293ba623446aaf1f2b90089af9fa7a21.zip
fix email notification bug
Diffstat (limited to 'src')
-rw-r--r--src/services/create-notification.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/services/create-notification.ts b/src/services/create-notification.ts
index 261b36814c..7d2726971f 100644
--- a/src/services/create-notification.ts
+++ b/src/services/create-notification.ts
@@ -1,6 +1,6 @@
import { publishMainStream } from './stream';
import pushSw from './push-notification';
-import { Notifications, Mutings, UserProfiles } from '../models';
+import { Notifications, Mutings, UserProfiles, Users } from '../models';
import { genId } from '@/misc/gen-id';
import { User } from '../models/entities/user';
import { Notification } from '../models/entities/notification';
@@ -53,8 +53,8 @@ export async function createNotification(
publishMainStream(notifieeId, 'unreadNotification', packed);
pushSw(notifieeId, 'notification', packed);
- if (type === 'follow') sendEmailNotification.follow(notifieeId, data);
- if (type === 'receiveFollowRequest') sendEmailNotification.receiveFollowRequest(notifieeId, data);
+ if (type === 'follow') sendEmailNotification.follow(notifieeId, await Users.findOneOrFail(data.notifierId!));
+ if (type === 'receiveFollowRequest') sendEmailNotification.receiveFollowRequest(notifieeId, await Users.findOneOrFail(data.notifierId!));
}, 2000);
return notification;