refactor: Rename function

This commit is contained in:
syuilo 2020-07-28 09:36:43 +09:00
parent 0efa969a15
commit a8adc46f3b
9 changed files with 17 additions and 17 deletions

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Channel from '../channel';
import { Notes } from '../../../../models';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
export default class extends Channel {
public readonly chName = 'antenna';
@ -25,7 +25,7 @@ export default class extends Channel {
const note = await Notes.pack(body.id, this.user, { detail: true });
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
this.send('note', note);
} else {

View file

@ -1,5 +1,5 @@
import autobind from 'autobind-decorator';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import Channel from '../channel';
import { fetchMeta } from '../../../../misc/fetch-meta';
import { Notes } from '../../../../models';
@ -46,7 +46,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
// 流れてきたNoteがミュートすべきNoteだったら無視する
// TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある)

View file

@ -1,5 +1,5 @@
import autobind from 'autobind-decorator';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import Channel from '../channel';
import { Notes } from '../../../../models';
import { PackedNote } from '../../../../models/repositories/note';
@ -34,7 +34,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
this.send('note', note);
}

View file

@ -1,5 +1,5 @@
import autobind from 'autobind-decorator';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import Channel from '../channel';
import { Notes } from '../../../../models';
import { PackedNote } from '../../../../models/repositories/note';
@ -51,7 +51,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
// 流れてきたNoteがミュートすべきNoteだったら無視する
// TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある)

View file

@ -1,5 +1,5 @@
import autobind from 'autobind-decorator';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import Channel from '../channel';
import { fetchMeta } from '../../../../misc/fetch-meta';
import { Notes } from '../../../../models';
@ -60,7 +60,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
// 流れてきたNoteがミュートすべきNoteだったら無視する
// TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある)

View file

@ -1,5 +1,5 @@
import autobind from 'autobind-decorator';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import Channel from '../channel';
import { fetchMeta } from '../../../../misc/fetch-meta';
import { Notes } from '../../../../models';
@ -48,7 +48,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
// 流れてきたNoteがミュートすべきNoteだったら無視する
// TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある)

View file

@ -1,7 +1,7 @@
import autobind from 'autobind-decorator';
import Channel from '../channel';
import { Notes, UserListJoinings, UserLists } from '../../../../models';
import shouldMuteThisNote from '../../../../misc/should-mute-this-note';
import { isMutedUserRelated } from '../../../../misc/is-muted-user-related';
import { User } from '../../../../models/entities/user';
import { PackedNote } from '../../../../models/repositories/note';
@ -73,7 +73,7 @@ export default class extends Channel {
}
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
if (isMutedUserRelated(note, this.muting)) return;
this.send('note', note);
}