Allow name property of user to be null
This commit is contained in:
parent
46e8fd44c1
commit
f0e8e6392b
52 changed files with 311 additions and 107 deletions
|
|
@ -1,12 +1,13 @@
|
|||
import { IUser, isLocalUser } from '../models/user';
|
||||
import getAcct from '../acct/render';
|
||||
import getUserName from './get-user-name';
|
||||
|
||||
/**
|
||||
* ユーザーを表す文字列を取得します。
|
||||
* @param user ユーザー
|
||||
*/
|
||||
export default function(user: IUser): string {
|
||||
let string = `${user.name} (@${getAcct(user)})\n` +
|
||||
let string = `${getUserName(user)} (@${getAcct(user)})\n` +
|
||||
`${user.postsCount}投稿、${user.followingCount}フォロー、${user.followersCount}フォロワー\n`;
|
||||
|
||||
if (isLocalUser(user)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue