Refactoring
This commit is contained in:
parent
1c241776a6
commit
dc69490e3a
27 changed files with 38 additions and 43 deletions
|
|
@ -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: {}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue