Refactoring
This commit is contained in:
@@ -3,7 +3,7 @@ import { User } from '../models/entities/user';
|
||||
import { sendEmail } from './send-email';
|
||||
import * as locales from '../../locales/';
|
||||
import { I18n } from '@/misc/i18n';
|
||||
import acct from '@/misc/acct/render';
|
||||
import { getAcct } from '@/misc/acct';
|
||||
|
||||
// TODO: locale ファイルをクライアント用とサーバー用で分けたい
|
||||
|
||||
@@ -13,7 +13,7 @@ async function follow(userId: User['id'], follower: User) {
|
||||
const locale = locales[userProfile.lang || 'ja-JP'];
|
||||
const i18n = new I18n(locale);
|
||||
// TODO: render user information html
|
||||
sendEmail(userProfile.email, i18n.t('_email._follow.title'), `${follower.name} (@${acct(follower)})`, `${follower.name} (@${acct(follower)})`);
|
||||
sendEmail(userProfile.email, i18n.t('_email._follow.title'), `${follower.name} (@${getAcct(follower)})`, `${follower.name} (@${getAcct(follower)})`);
|
||||
}
|
||||
|
||||
async function receiveFollowRequest(userId: User['id'], args: {}) {
|
||||
|
||||
Reference in New Issue
Block a user