hippofish/src/remote/activitypub/renderer/emoji.ts
MeiMei 80b5fda292 Remote custom emojis (#3074)
* Remote custom emojis

* んほおおおおお
2018-11-02 08:59:40 +09:00

14 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
}
});