wip
This commit is contained in:
@ -18,6 +18,7 @@ import { IApp } from '../../models/app';
|
||||
import UserList from '../../models/user-list';
|
||||
import resolveUser from '../../remote/resolve-user';
|
||||
import Meta from '../../models/meta';
|
||||
import config from '../../config';
|
||||
|
||||
type Type = 'reply' | 'renote' | 'quote' | 'mention';
|
||||
|
||||
@ -366,7 +367,7 @@ export default async (user: IUser, data: {
|
||||
watch(user._id, data.reply);
|
||||
}
|
||||
|
||||
// (自分自身へのリプライでない限りは)通知を作成
|
||||
// 通知
|
||||
nm.push(data.reply.userId, 'reply');
|
||||
}
|
||||
|
||||
@ -427,4 +428,18 @@ export default async (user: IUser, data: {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Register to search database
|
||||
if (note.text && config.elasticsearch) {
|
||||
const es = require('../../../db/elasticsearch');
|
||||
|
||||
es.index({
|
||||
index: 'misskey',
|
||||
type: 'note',
|
||||
id: note._id.toString(),
|
||||
body: {
|
||||
text: note.text
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user