mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-02 02:26:44 -06:00
8 lines
338 B
TypeScript
8 lines
338 B
TypeScript
import { IUser, isRemoteUser } from '../../../models/user';
|
|
import config from '../../../config';
|
|
|
|
export default (mention: IUser) => ({
|
|
type: 'Mention',
|
|
href: isRemoteUser(mention) ? mention.uri : `${config.url}/@${mention.username}`,
|
|
name: isRemoteUser(mention) ? `@${mention.username}@${mention.host}` : `@${mention.username}`,
|
|
});
|