(enhance) notes/create で予約投稿できるように
This commit is contained in:
parent
1995400dac
commit
2bc15c09ed
9 changed files with 122 additions and 23 deletions
|
|
@ -40,7 +40,9 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
async function deleteScheduleNote() {
|
||||
await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id })
|
||||
if (!props.note.isSchedule) return;
|
||||
// スケジュールつきノートの場合は、ノートIDのフィールドに予約投稿ID(scheduledNoteId)が入るので注意!!!!
|
||||
await os.apiWithDialog('notes/schedule/delete', { scheduledNoteId: props.note.id })
|
||||
.then(() => {
|
||||
isDeleted.value = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ async function post(ev?: MouseEvent) {
|
|||
renoteId: props.renote ? props.renote.id : quoteId ? quoteId : undefined,
|
||||
channelId: props.channel ? props.channel.id : undefined,
|
||||
schedule,
|
||||
poll: poll,
|
||||
poll,
|
||||
cw: useCw ? cw ?? '' : null,
|
||||
localOnly: localOnly,
|
||||
visibility: visibility,
|
||||
|
|
@ -783,11 +783,11 @@ async function post(ev?: MouseEvent) {
|
|||
|
||||
if (postAccount) {
|
||||
const storedAccounts = await getAccounts();
|
||||
token = storedAccounts.find(x => x.id === postAccount.id)?.token;
|
||||
token = storedAccounts.find(x => x.id === postAccount?.id)?.token;
|
||||
}
|
||||
|
||||
posting = true;
|
||||
os.api(postData.schedule ? 'notes/schedule/create' : 'notes/create', postData, token).then(() => {
|
||||
os.api('notes/create', postData, token).then(() => {
|
||||
if (props.freezeAfterPosted) {
|
||||
posted = true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue