bigbuffet-rw/app/soapbox/normalizers/emoji.ts
2022-03-11 21:22:11 -06:00

14 lines
360 B
TypeScript

import { Record as ImmutableRecord, Map as ImmutableMap } from 'immutable';
// https://docs.joinmastodon.org/entities/emoji/
const EmojiRecord = ImmutableRecord({
category: '',
shortcode: '',
static_url: '',
url: '',
visible_in_picker: true,
});
export const normalizeEmoji = (emoji: ImmutableMap<string, any>) => {
return EmojiRecord(emoji);
};