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

ダイレクト投稿を削除して編集すると宛先(visibleuserids)が保持されない #14279

Closed
1 task
anatawa12 opened this issue Jul 20, 2024 · 4 comments · Fixed by #14285
Closed
1 task
Assignees
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR

Comments

@anatawa12
Copy link
Member

💡 Summary

ダイレクト投稿を削除して編集すると宛先(visibleuserids)が保持されず、メンションを行っていない場合には復元することが娘を何である

🥰 Expected Behavior

ダイレクト投稿を削除して編集すると宛先が保持される

🤬 Actual Behavior

ダイレクト投稿を削除して編集すると宛先が保持されない

📝 Steps to Reproduce

  1. 誰かを宛先にしたダイレクト投稿を送信する
  2. その投稿を削除して編集するとダイレクト投稿の宛先がからの状態の投稿画面になっている

💻 Frontend Environment

* Model and OS of the device(s): win11
* Browser:firefox
* Server URL:https://misskey.niri.la/
* Misskey:2024.5.0-kinel.4

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* Misskey:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@anatawa12 anatawa12 added the ⚠️bug? This might be a bug label Jul 20, 2024
@tai-cha
Copy link
Contributor

tai-cha commented Jul 21, 2024

娘を何である

難しくなる…?

@kussy-tessy
Copy link

困難である

@Sayamame-beans
Copy link
Member

Sayamame-beans commented Jul 21, 2024

Related: #13717
下書きでは実装されたが

// 書きかけの投稿を復元
if (!props.instant && !props.mention && !props.specified && !props.mock) {
const draft = JSON.parse(miLocalStorage.getItem('drafts') ?? '{}')[draftKey.value];
if (draft) {
text.value = draft.data.text;
useCw.value = draft.data.useCw;
cw.value = draft.data.cw;
visibility.value = draft.data.visibility;
localOnly.value = draft.data.localOnly;
files.value = (draft.data.files || []).filter(draftFile => draftFile);
if (draft.data.poll) {
poll.value = draft.data.poll;
}
if (draft.data.visibleUserIds) {
misskeyApi('users/show', { userIds: draft.data.visibleUserIds }).then(users => {
users.forEach(u => pushVisibleUser(u));
});
}
}
}

削除して編集には無い

// 削除して編集
if (props.initialNote) {
const init = props.initialNote;
text.value = init.text ? init.text : '';
files.value = init.files ?? [];
cw.value = init.cw ?? null;
useCw.value = init.cw != null;
if (init.poll) {
poll.value = {
choices: init.poll.choices.map(x => x.text),
multiple: init.poll.multiple,
expiresAt: init.poll.expiresAt ? (new Date(init.poll.expiresAt)).getTime() : null,
expiredAfter: null,
};
}
visibility.value = init.visibility;
localOnly.value = init.localOnly ?? false;
quoteId.value = init.renote ? init.renote.id : null;
}

@Sayamame-beans Sayamame-beans added 🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR and removed ⚠️bug? This might be a bug labels Jul 21, 2024
@Sayamame-beans Sayamame-beans self-assigned this Jul 21, 2024
@Sayamame-beans
Copy link
Member

reactionAcceptanceも保持されていない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR
Projects
None yet
4 participants