autoWatch機能を削除

This commit is contained in:
syuilo 2020-11-08 16:49:23 +09:00
parent a6985d7dc7
commit 9d1fa3f202
10 changed files with 17 additions and 72 deletions

View file

@ -120,13 +120,6 @@ export const meta = {
}
},
autoWatch: {
validator: $.optional.bool,
desc: {
'ja-JP': '投稿の自動ウォッチをするか否か'
}
},
injectFeaturedNote: {
validator: $.optional.bool,
},
@ -212,7 +205,6 @@ export default define(meta, async (ps, user, token) => {
if (typeof ps.carefulBot === 'boolean') profileUpdates.carefulBot = ps.carefulBot;
if (typeof ps.autoAcceptFollowed === 'boolean') profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed;
if (typeof ps.isCat === 'boolean') updates.isCat = ps.isCat;
if (typeof ps.autoWatch === 'boolean') profileUpdates.autoWatch = ps.autoWatch;
if (typeof ps.injectFeaturedNote === 'boolean') profileUpdates.injectFeaturedNote = ps.injectFeaturedNote;
if (typeof ps.alwaysMarkNsfw === 'boolean') profileUpdates.alwaysMarkNsfw = ps.alwaysMarkNsfw;

View file

@ -1,6 +1,5 @@
import $ from 'cafy';
import { ID } from '../../../../../misc/cafy-id';
import watch from '../../../../../services/note/watch';
import { publishNoteStream } from '../../../../../services/stream';
import { createNotification } from '../../../../../services/create-notification';
import define from '../../../define';
@ -10,7 +9,7 @@ import { deliver } from '../../../../../queue';
import { renderActivity } from '../../../../../remote/activitypub/renderer';
import renderVote from '../../../../../remote/activitypub/renderer/vote';
import { deliverQuestionUpdate } from '../../../../../services/note/polls/update';
import { PollVotes, NoteWatchings, Users, Polls, UserProfiles } from '../../../../../models';
import { PollVotes, NoteWatchings, Users, Polls } from '../../../../../models';
import { Not } from 'typeorm';
import { IRemoteUser } from '../../../../../models/entities/user';
import { genId } from '../../../../../misc/gen-id';
@ -152,13 +151,6 @@ export default define(meta, async (ps, user) => {
}
});
const profile = await UserProfiles.findOne(user.id).then(ensure);
// この投稿をWatchする
if (profile.autoWatch !== false) {
watch(user.id, note);
}
// リモート投票の場合リプライ送信
if (note.userHost != null) {
const pollOwner = await Users.findOne(note.userId).then(ensure) as IRemoteUser;