Skip to content

Commit

Permalink
Merge pull request #792 from traPtitech/fix/upload-while-upload
Browse files Browse the repository at this point in the history
アップロード中に送信ボタンが押せてた
  • Loading branch information
sapphi-red authored May 5, 2020
2 parents da96832 + a482c11 commit 6428da1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default defineComponent({
border: {
width: 2px;
style: solid;
color: $theme-background-secondary;
}
max-width: min(600px, 100%);
img {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Main/MainView/MessageInput/use/postMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ const usePostMessage = (
})

try {
isPosting.value = true

const fileUrls = await uploadAttachments(
store.state.ui.fileInput.attachments,
props.channelId
)
const embededdUrls = fileUrls.join('\n')

isPosting.value = true
await apis.postMessage(props.channelId, {
content: embededText + (embededdUrls ? '\n' + embededdUrls : '')
})
Expand Down

0 comments on commit 6428da1

Please sign in to comment.