1
0

fix: use only_direct instead

This commit is contained in:
オスカー、 2024-04-08 01:38:33 +09:00
parent 09de2e80f3
commit 3c6eb789da

View File

@ -11,8 +11,8 @@ export function fetchDirectStatuses() {
return (dispatch, getState) => {
dispatch(fetchDirectStatusesRequest());
api(getState).get(`/api/v1/accounts/${me}/statuses`).then(response => {
const directRes = (response.data).filter((item) => item==null || item.visibility ==='direct');
api(getState).get(`/api/v1/accounts/${me}/statuses?only_direct=true`).then(response => {
const directRes = response.data;
dispatch(importFetchedStatuses(directRes));
dispatch(fetchDirectStatusesSuccess(directRes, null));
}).catch(error => {