diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-04-08 13:31:42 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-08 13:31:42 +0900 |
| commit | a6537a87488f8e5cf91c2f342b6b207158ea41e2 (patch) | |
| tree | e63c9c50ffcde552d02efa961c932fa1222863de /src/client/app/common/views/widgets | |
| parent | Update README.md [AUTOGEN] (#4652) (diff) | |
| download | sharkey-a6537a87488f8e5cf91c2f342b6b207158ea41e2.tar.gz sharkey-a6537a87488f8e5cf91c2f342b6b207158ea41e2.tar.bz2 sharkey-a6537a87488f8e5cf91c2f342b6b207158ea41e2.zip | |
Fix: 投稿ウィジットでローカルのみの公開範囲で投稿できない (#4647)
Diffstat (limited to 'src/client/app/common/views/widgets')
| -rw-r--r-- | src/client/app/common/views/widgets/post-form.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/client/app/common/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue index 5a456d8108..f1826cc59f 100644 --- a/src/client/app/common/views/widgets/post-form.vue +++ b/src/client/app/common/views/widgets/post-form.vue @@ -176,10 +176,22 @@ export default define({ post() { this.posting = true; + let visibility = 'public'; + let localOnly = false; + + const m = this.$store.state.settings.defaultNoteVisibility.match(/^local-(.+)/); + if (m) { + visibility = m[1]; + localOnly = true; + } else { + visibility = this.$store.state.settings.defaultNoteVisibility; + } + this.$root.api('notes/create', { text: this.text == '' ? undefined : this.text, fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined, - visibility: this.$store.state.settings.defaultNoteVisibility + visibility, + localOnly, }).then(data => { this.clear(); }).catch(err => { |