Skip to content
Snippets Groups Projects
Commit a6537a87 authored by MeiMei's avatar MeiMei Committed by syuilo
Browse files

Fix: 投稿ウィジットでローカルのみの公開範囲で投稿できない (#4647)

parent 842b7597
No related branches found
No related tags found
No related merge requests found
......@@ -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 => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment