Merge pull request #32 from anatawa12/pick-renote-sensitive-home-by-default

Pick renote sensitive home by default
This commit is contained in:
anatawa12 2023-08-06 18:00:44 +09:00 committed by GitHub
commit 93df9394cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,7 @@
- ハイライトから除外するチャンネルをsensitiveチャンネルのみにしました - ハイライトから除外するチャンネルをsensitiveチャンネルのみにしました
### Client ### Client
- センシティブチャンネルのNoteのReNoteはデフォルトでHome TLに流れるようになりました
- Enhance: Renote自体を通報できるように - Enhance: Renote自体を通報できるように
### Server ### Server

View File

@ -319,9 +319,15 @@ function renote(viaKeyboard = false) {
const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility; const configuredVisibility = defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility;
const localOnly = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly; const localOnly = defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
let visibility = appearNote.visibility;
visibility = smallerVisibility(visibility, configuredVisibility);
if (appearNote.channel?.isSensitive) {
visibility = smallerVisibility(visibility, 'home');
}
os.api('notes/create', { os.api('notes/create', {
localOnly, localOnly,
visibility: smallerVisibility(appearNote.visibility, configuredVisibility), visibility,
renoteId: appearNote.id, renoteId: appearNote.id,
}).then(() => { }).then(() => {
os.toast(i18n.ts.renoted); os.toast(i18n.ts.renoted);