Sharkey/src/remote/activitypub/renderer/emoji.ts

15 lines
388 B
TypeScript
Raw Normal View History

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