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

フォロー通知のEメール通知を修正

parent 90a7b9b5
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,4 @@
### Bugfixes
- ハッシュタグ入力が空のときに#が付くのを修正
- フォロー通知のEメール通知を修正
......@@ -16,12 +16,13 @@ async function follow(userId: User['id'], follower: User) {
sendEmail(userProfile.email, i18n.t('_email._follow.title'), `${follower.name} (@${getAcct(follower)})`, `${follower.name} (@${getAcct(follower)})`);
}
async function receiveFollowRequest(userId: User['id'], args: {}) {
async function receiveFollowRequest(userId: User['id'], follower: User) {
const userProfile = await UserProfiles.findOneOrFail({ userId: userId });
if (!userProfile.email || !userProfile.emailNotificationTypes.includes('receiveFollowRequest')) return;
const locale = locales[userProfile.lang || 'ja-JP'];
const i18n = new I18n(locale);
sendEmail(userProfile.email, i18n.t('_email._receiveFollowRequest.title'), 'test', 'test');
// TODO: render user information html
sendEmail(userProfile.email, i18n.t('_email._receiveFollowRequest.title'), `${follower.name} (@${getAcct(follower)})`, `${follower.name} (@${getAcct(follower)})`);
}
export const sendEmailNotification = {
......
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