Skip to content
Snippets Groups Projects
Commit f3b3e063 authored by syuilo's avatar syuilo
Browse files

fix email notification bug

parent 98249942
No related branches found
No related tags found
No related merge requests found
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment