monkeeShark/packages/backend/src/remote/activitypub/renderer/emoji.ts
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

14 lines
390 B
TypeScript

import config from '@/config/index';
import { Emoji } from '@/models/entities/emoji';
export default (emoji: Emoji) => ({
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: emoji.type || 'image/png',
url: emoji.url
}
});