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

This commit is contained in:
MeiMei 2019-04-08 20:16:00 +09:00 committed by syuilo
parent 4b5f88b3ac
commit ee468861ba

View file

@ -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 => {