15 lines
388 B
TypeScript
15 lines
388 B
TypeScript
|
import { IEmoji } from '../../../models/emoji';
|
||
|
import config from '../../../config';
|
||
|
|
||
|
export default (emoji: IEmoji) => ({
|
||
|
id: `${config.url}/emojis/${emoji.name}`,
|
||
|
type: 'Emoji',
|
||
|
name: `:${emoji.name}:`,
|
||
|
updated: emoji.updatedAt != null ? emoji.updatedAt.toISOString() : new Date().toISOString,
|
||
|
icon: {
|
||
|
type: 'Image',
|
||
|
mediaType: 'image/png', //Mei-TODO
|
||
|
url: emoji.url
|
||
|
}
|
||
|
});
|