refactor: remove duplicate code (#8895)
This commit is contained in:
parent
0ec266abf7
commit
bc3ae901cc
12 changed files with 41 additions and 64 deletions
|
|
@ -2,7 +2,7 @@ import { Antenna } from '@/models/entities/antenna.js';
|
|||
import { Note } from '@/models/entities/note.js';
|
||||
import { AntennaNotes, Mutings, Notes } from '@/models/index.js';
|
||||
import { genId } from '@/misc/gen-id.js';
|
||||
import { isMutedUserRelated } from '@/misc/is-muted-user-related.js';
|
||||
import { isUserRelated } from '@/misc/is-user-related.js';
|
||||
import { publishAntennaStream, publishMainStream } from '@/services/stream.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: {
|
|||
_note.renote = await Notes.findOneByOrFail({ id: note.renoteId });
|
||||
}
|
||||
|
||||
if (isMutedUserRelated(_note, new Set<string>(mutings.map(x => x.muteeId)))) {
|
||||
if (isUserRelated(_note, new Set<string>(mutings.map(x => x.muteeId)))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue