From b2e5ade5ac92a5001d50415219129e050d3247e6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 11 Aug 2021 21:08:05 +0900 Subject: [PATCH] =?UTF-8?q?=20=E3=83=95=E3=82=A9=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=AEE=E3=83=A1=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/services/send-email-notification.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 753c37e13..c85afa04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,4 @@ ### Bugfixes - ハッシュタグ入力が空のときに#が付くのを修正 +- フォロー通知のEメール通知を修正 diff --git a/src/services/send-email-notification.ts b/src/services/send-email-notification.ts index b47558512..ad1742951 100644 --- a/src/services/send-email-notification.ts +++ b/src/services/send-email-notification.ts @@ -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 = {