perf: 各ストリーミング接続ごとにポーリングしないように

This commit is contained in:
syuilo 2021-03-21 15:14:03 +09:00
parent b6d0d4eb99
commit 8050352ad8
11 changed files with 83 additions and 27 deletions

View file

@ -6,6 +6,7 @@ import { getUser } from '../../common/getters';
import { genId } from '../../../../misc/gen-id';
import { Mutings, NoteWatchings } from '../../../../models';
import { Muting } from '../../../../models/entities/muting';
import { publishUserEvent } from '../../../../services/stream';
export const meta = {
desc: {
@ -82,6 +83,8 @@ export default define(meta, async (ps, user) => {
muteeId: mutee.id,
} as Muting);
publishUserEvent(user.id, 'mute', mutee);
NoteWatchings.delete({
userId: muter.id,
noteUserId: mutee.id