diff options
| author | おさむのひと <46447427+samunohito@users.noreply.github.com> | 2024-01-04 18:32:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-04 18:32:46 +0900 |
| commit | fa9c4a19b98167c7552bec8f4d791bd89db8fbbe (patch) | |
| tree | b889429cd20a5160de818ee61c2dcd9066e2c14b /packages/frontend/src/components/MkPostForm.vue | |
| parent | refactor(frontend): reduce type errors (diff) | |
| download | sharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.gz sharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.bz2 sharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.zip | |
refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる (#12694)
* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる
* fix
* fix
* renate to "misskeyApi"
* rename file
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
| -rw-r--r-- | packages/frontend/src/components/MkPostForm.vue | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index b86f50eac6..8c6fba6637 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -115,6 +115,7 @@ import { extractMentions } from '@/scripts/extract-mentions.js'; import { formatTimeString } from '@/scripts/format-time-string.js'; import { Autocomplete } from '@/scripts/autocomplete.js'; import * as os from '@/os.js'; +import { misskeyApi } from '@/scripts/misskey-api.js'; import { selectFiles } from '@/scripts/select-file.js'; import { defaultStore, notePostInterruptors, postFormActions } from '@/store.js'; import MkInfo from '@/components/MkInfo.vue'; @@ -328,7 +329,7 @@ if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visib if (visibility.value === 'specified') { if (props.reply.visibleUserIds) { - os.api('users/show', { + misskeyApi('users/show', { userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId), }).then(users => { users.forEach(pushVisibleUser); @@ -336,7 +337,7 @@ if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visib } if (props.reply.userId !== $i.id) { - os.api('users/show', { userId: props.reply.userId }).then(user => { + misskeyApi('users/show', { userId: props.reply.userId }).then(user => { pushVisibleUser(user); }); } @@ -383,7 +384,7 @@ function addMissingMention() { for (const x of extractMentions(ast)) { if (!visibleUsers.value.some(u => (u.username === x.username) && (u.host === x.host))) { - os.api('users/show', { username: x.username, host: x.host }).then(user => { + misskeyApi('users/show', { username: x.username, host: x.host }).then(user => { visibleUsers.value.push(user); }); } @@ -784,7 +785,7 @@ async function post(ev?: MouseEvent) { } posting.value = true; - os.api('notes/create', postData, token).then(() => { + misskeyApi('notes/create', postData, token).then(() => { if (props.freezeAfterPosted) { posted.value = true; } else { |