diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index 9e2c96b5a5..690bcb3815 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -30,6 +30,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE ### Client - Fix: 타임라인 노트의 리액션 뷰어에 리모트 서버의 커스텀 이모지가 표시되지 않음 +- Fix: '리노트 공개 범위 지정' 옵션이 `없음`으로 설정된 경우 리노트를 할 수 없음 ### Server - Feat: 리모트 유저의 아바타 장식을 여러 개 불러올 수 있음([yunochi/misskey@696787b3](https://github.com/yunochi/misskey/commit/696787b38bac31e7586899a5a59611a6fe50b9a1), [yunochi/misskey@4a5fcfe4](https://github.com/yunochi/misskey/commit/4a5fcfe43880f08380541caa6b7593b90306d103)) diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index 60d0ccb03d..225f5ede73 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -635,6 +635,7 @@ export function getQuoteMenu(props: { const isRenote = ( props.note.renote != null && props.note.text == null && + props.note.fileIds && props.note.fileIds.length === 0 && props.note.poll == null ); @@ -679,6 +680,7 @@ export function getRenoteMenu(props: { const isRenote = ( props.note.renote != null && props.note.text == null && + props.note.fileIds && props.note.fileIds.length === 0 && props.note.poll == null ); @@ -889,12 +891,13 @@ export function getRenoteMenu(props: { export async function getRenoteOnly(props: { note: Misskey.entities.Note; - renoteButton: Ref; + renoteButton: ShallowRef; mock?: boolean; }) { const isRenote = ( props.note.renote != null && props.note.text == null && + props.note.fileIds && props.note.fileIds.length === 0 && props.note.poll == null ); @@ -960,40 +963,60 @@ export async function getRenoteOnly(props: { // Add visibility section if ( !defaultStore.state.renoteVisibilitySelection && - defaultStore.state.forceRenoteVisibilitySelection !== 'none' && - !['followers', 'specified'].includes(appearNote.visibility) + appearNote.visibility !== 'specified' ) { - // renote to public - if (appearNote.visibility === 'public' && defaultStore.state.forceRenoteVisibilitySelection === 'public') { - misskeyApi('notes/create', { - localOnly, - visibility: 'public', - renoteId: appearNote.id, - }).then(() => { - os.toast(i18n.ts.renoted, 'renote'); - }); - } - - // renote to home - if (['home', 'public'].includes(appearNote.visibility) && defaultStore.state.forceRenoteVisibilitySelection === 'home') { - misskeyApi('notes/create', { - localOnly, - visibility: 'home', - renoteId: appearNote.id, - }).then(() => { - os.toast(i18n.ts.renoted, 'renote'); - }); - } - - // renote to followers - if (defaultStore.state.forceRenoteVisibilitySelection === 'followers') { - misskeyApi('notes/create', { - localOnly, - visibility: 'followers', - renoteId: appearNote.id, - }).then(() => { - os.toast(i18n.ts.renoted, 'renote'); - }); + if (defaultStore.state.forceRenoteVisibilitySelection !== 'none') { + if (appearNote.visibility === 'public' && defaultStore.state.forceRenoteVisibilitySelection === 'public') { // renote to public + misskeyApi('notes/create', { + localOnly, + visibility: 'public', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } else if (['home', 'public'].includes(appearNote.visibility) && defaultStore.state.forceRenoteVisibilitySelection === 'home') { // renote to home + misskeyApi('notes/create', { + localOnly, + visibility: 'home', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } else if (appearNote.visibility === 'followers' && defaultStore.state.forceRenoteVisibilitySelection === 'followers') { // renote to followers + misskeyApi('notes/create', { + localOnly, + visibility: 'followers', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } + } else { + if (appearNote.visibility === 'public') { // renote to public + misskeyApi('notes/create', { + localOnly, + visibility: 'public', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } else if (['home', 'public'].includes(appearNote.visibility)) { // renote to home + misskeyApi('notes/create', { + localOnly, + visibility: 'home', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } else if (appearNote.visibility === 'followers') { // renote to followers + misskeyApi('notes/create', { + localOnly, + visibility: 'followers', + renoteId: appearNote.id, + }).then(() => { + os.toast(i18n.ts.renoted, 'renote'); + }); + } } } }