Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ダイレクト投稿の宛先が保存されない #13717

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- Fix: CWのみの引用リノートが詳細ページで純粋なリノートとして誤って扱われてしまう問題を修正
- Fix: ノート詳細ページにおいてCW付き引用リノートのCWボタンのラベルに「引用」が含まれていない問題を修正
- Fix: ダイアログの入力で字数制限に違反していてもEnterキーが押せてしまう問題を修正
- Fix: ダイレクト投稿の宛先が保存されない問題を修正

### Server
- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/components/MkPostForm.vue
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visibleUsersをそのまま保存しない理由はユーザのアイコン等の情報が変わっている可能性が十分にあると考えたためです

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

恐らく本来は、 https://github.com/anatawa12/misskey/blob/429d44348baf632f7be2f2dda64cc4c41413c773/packages/frontend/src/components/MkPostForm.vue#L361-L369 でvisibleUserIdsをwatchしないといけなさそう。

ただ、宛先を追加するとメンションが追加され、メンションが追加されることでtextが更新されてwatchForDraftが発動するので、現状困ってない状態になっていそう。

Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ function saveDraft() {
localOnly: localOnly.value,
files: files.value,
poll: poll.value,
visibleUserIds: visibility.value === 'specified' ? visibleUsers.value.map(x => x.id) : undefined,
},
};

Expand Down Expand Up @@ -960,6 +961,11 @@ onMounted(() => {
if (draft.data.poll) {
poll.value = draft.data.poll;
}
if (draft.data.visibleUserIds) {
misskeyApi('users/show', { userIds: draft.data.visibleUserIds }).then(users => {
users.forEach(pushVisibleUser);
});
}
}
}

Expand Down
Loading