From 80b5fda292efd70cc749910e3672d50c9a70a72e Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 2 Nov 2018 08:59:40 +0900 Subject: Remote custom emojis (#3074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remote custom emojis * んほおおおおお --- src/models/note.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/models/note.ts') diff --git a/src/models/note.ts b/src/models/note.ts index 09246dea45..684e8c3b1e 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -12,6 +12,7 @@ import { packMany as packFileMany, IDriveFile } from './drive-file'; import Favorite from './favorite'; import Following from './following'; import config from '../config'; +import { packEmojis } from './emoji'; const Note = db.get('notes'); Note.createIndex('uri', { sparse: true, unique: true }); @@ -228,6 +229,11 @@ export const pack = async ( const id = _note._id; + // _note._userを消す前か、_note.userを解決した後でないとホストがわからない + if (_note._user) { + _note.emojis = packEmojis(_note._user.host); + } + // Rename _id to id _note.id = _note._id; delete _note._id; -- cgit v1.2.3-freya