mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 19:26:44 -06:00
84db15694d
投稿作成時に含まれている絵文字を保存しておくように SEE: https://github.com/syuilo/misskey/pull/3085#issuecomment-435608434
18 lines
371 B
TypeScript
18 lines
371 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const Emoji = db.get<IEmoji>('emoji');
|
|
Emoji.createIndex('name');
|
|
Emoji.createIndex('host');
|
|
Emoji.createIndex(['name', 'host'], { unique: true });
|
|
|
|
export default Emoji;
|
|
|
|
export type IEmoji = {
|
|
_id: mongo.ObjectID;
|
|
name: string;
|
|
host: string;
|
|
url: string;
|
|
aliases?: string[];
|
|
updatedAt?: Date;
|
|
};
|