mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 08:53:09 +02:00
フォロー通知のEメール通知を修正
This commit is contained in:
parent
90a7b9b551
commit
b2e5ade5ac
2 changed files with 4 additions and 2 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue