Refactor
This commit is contained in:
@@ -253,7 +253,7 @@ export default async (user: User, data: Option, silent = false) => new Promise<N
|
||||
deliverNoteToMentionedRemoteUsers(mentionedUsers, user, noteActivity);
|
||||
}
|
||||
|
||||
const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure);
|
||||
const profile = await UserProfiles.findOne(user.id).then(ensure);
|
||||
|
||||
// If has in reply to note
|
||||
if (data.reply) {
|
||||
|
@@ -67,7 +67,7 @@ export default async function(user: User, note: Note, choice: number) {
|
||||
}
|
||||
});
|
||||
|
||||
const profile = await UserProfiles.findOne({ userId: user.id });
|
||||
const profile = await UserProfiles.findOne(user.id);
|
||||
|
||||
// ローカルユーザーが投票した場合この投稿をWatchする
|
||||
if (Users.isLocalUser(user) && profile!.autoWatch) {
|
||||
|
@@ -80,7 +80,7 @@ export default async (user: User, note: Note, reaction?: string) => {
|
||||
}
|
||||
});
|
||||
|
||||
const profile = await UserProfiles.findOne({ userId: user.id });
|
||||
const profile = await UserProfiles.findOne(user.id);
|
||||
|
||||
// ユーザーがローカルユーザーかつ自動ウォッチ設定がオンならばこの投稿をWatchする
|
||||
if (Users.isLocalUser(user) && profile!.autoWatch) {
|
||||
|
Reference in New Issue
Block a user