diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index eebff2a7b685b9..137d70687de07b 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -2,7 +2,6 @@ import { Route, ViewType } from '@/types'; import utils from './utils'; import api from './api'; import logger from '@/utils/logger'; -import { config } from '@/config'; export const route: Route = { path: '/user/:id/:routeParams?', @@ -60,15 +59,9 @@ async function handler(ctx) { const id = ctx.req.param('id'); // For compatibility - const { count, exclude_replies: initialExcludeReplies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, exclude_replies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; - // Third party API does not support replies for now - let exclude_replies = initialExcludeReplies; - if (config.twitter.thirdPartyApi) { - exclude_replies = true; - } - await api.init(); const userInfo = await api.getUser(id); let data;