using set instead of array for search (#7126)

* Resolve #6905

* Resolve #6905

* Resolve #6905
This commit is contained in:
Ehsan Javadynia
2021-01-30 05:39:46 +03:30
committed by GitHub
parent 100a131913
commit ff67fb337e
7 changed files with 18 additions and 18 deletions

View File

@@ -40,7 +40,7 @@ export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: U
_note.renote = await Notes.findOne(note.renoteId).then(ensure);
}
if (isMutedUserRelated(_note, mutings.map(x => x.muteeId))) {
if (isMutedUserRelated(_note, new Set<string>(mutings.map(x => x.muteeId)))) {
return;
}