mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-06 00:33:51 +09:00
perf(server): disable some antenna features to improve performance
This commit is contained in:
@ -275,22 +275,13 @@ export default async (user: { id: User['id']; username: User['username']; host:
|
||||
});
|
||||
|
||||
// Antenna
|
||||
// TODO: キャッシュしたい
|
||||
Followings.createQueryBuilder('following')
|
||||
.andWhere(`following.followeeId = :userId`, { userId: note.userId })
|
||||
.getMany()
|
||||
.then(async followings => {
|
||||
const blockings = await Blockings.find({ blockerId: user.id });
|
||||
const followers = followings.map(f => f.followerId);
|
||||
for (const antenna of (await getAntennas())) {
|
||||
if (blockings.some(blocking => blocking.blockeeId === antenna.userId)) continue; // この処理は checkHitAntenna 内でやるようにしてもいいかも
|
||||
checkHitAntenna(antenna, note, user, followers).then(hit => {
|
||||
if (hit) {
|
||||
addNoteToAntenna(antenna, note, user);
|
||||
}
|
||||
});
|
||||
for (const antenna of (await getAntennas())) {
|
||||
checkHitAntenna(antenna, note, user).then(hit => {
|
||||
if (hit) {
|
||||
addNoteToAntenna(antenna, note, user);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Channel
|
||||
if (note.channelId) {
|
||||
|
Reference in New Issue
Block a user