1
0
forked from mirror/misskey

リモートユーザー向けのNoteUnreadsレコードは作成しないように (#5280)

This commit is contained in:
MeiMei 2019-08-17 14:40:06 +09:00 committed by syuilo
parent 6cdbb27169
commit 6060c6d56e

View File

@ -1,10 +1,13 @@
import { Note } from '../../models/entities/note'; import { Note } from '../../models/entities/note';
import { publishMainStream } from '../stream'; import { publishMainStream } from '../stream';
import { User } from '../../models/entities/user'; import { User } from '../../models/entities/user';
import { Mutings, NoteUnreads } from '../../models'; import { Mutings, NoteUnreads, Users } from '../../models';
import { genId } from '../../misc/gen-id'; import { genId } from '../../misc/gen-id';
export default async function(user: User, note: Note, isSpecified = false) { export default async function(user: User, note: Note, isSpecified = false) {
// ローカルユーザーのみ
if (!Users.isLocalUser(user)) return;
//#region ミュートしているなら無視 //#region ミュートしているなら無視
const mute = await Mutings.find({ const mute = await Mutings.find({
muterId: user.id muterId: user.id