diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-07-25 13:28:33 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-07-25 13:28:33 +0900 |
| commit | f3b3e063293ba623446aaf1f2b90089af9fa7a21 (patch) | |
| tree | 405efc38880373aafdc9af9a1876122932b3ede5 /src | |
| parent | fix bug (diff) | |
| download | sharkey-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.ts | 6 |
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; |