Fix: #371 サークルを選んだ状態でサークル以外の公開範囲で投稿した場合、投稿履歴に投稿が追加される (#388)

This commit is contained in:
KMY(雪あすか) 2023-12-26 09:43:33 +09:00 committed by GitHub
parent b94ffe6699
commit 90155481d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,6 +177,7 @@ export function submitCompose(routerHistory) {
const media = getState().getIn(['compose', 'media_attachments']); const media = getState().getIn(['compose', 'media_attachments']);
const statusId = getState().getIn(['compose', 'id'], null); const statusId = getState().getIn(['compose', 'id'], null);
const circleId = getState().getIn(['compose', 'circle_id'], null); const circleId = getState().getIn(['compose', 'circle_id'], null);
const privacy = getState().getIn(['compose', 'privacy']);
if ((!status || !status.length) && media.size === 0) { if ((!status || !status.length) && media.size === 0) {
return; return;
@ -256,7 +257,7 @@ export function submitCompose(routerHistory) {
insertIfOnline(`account:${response.data.account.id}`); insertIfOnline(`account:${response.data.account.id}`);
} }
if (statusId === null && circleId !== null && circleId !== 0) { if (statusId === null && privacy === 'circle' && circleId !== null && circleId !== 0) {
dispatch(submitComposeWithCircleSuccess({ ...response.data }, circleId)); dispatch(submitComposeWithCircleSuccess({ ...response.data }, circleId));
} }