using set instead of array for search (#7126)
* Resolve #6905 * Resolve #6905 * Resolve #6905
This commit is contained in:
parent
100a131913
commit
ff67fb337e
7 changed files with 18 additions and 18 deletions
|
@ -19,10 +19,10 @@ export default class extends Channel {
|
|||
@autobind
|
||||
private async onNote(note: PackedNote) {
|
||||
if (note.channelId) {
|
||||
if (!this.followingChannels.includes(note.channelId)) return;
|
||||
if (!this.followingChannels.has(note.channelId)) return;
|
||||
} else {
|
||||
// その投稿のユーザーをフォローしていなかったら弾く
|
||||
if ((this.user!.id !== note.userId) && !this.following.includes(note.userId)) return;
|
||||
if ((this.user!.id !== note.userId) && !this.following.has(note.userId)) return;
|
||||
}
|
||||
|
||||
if (['followers', 'specified'].includes(note.visibility)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue