mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-16 08:36:27 +01:00
Fix: 投稿ウィジットでローカルのみの公開範囲で投稿できない (#4653)
This commit is contained in:
parent
82af9320c0
commit
f2ad1a0406
1 changed files with 13 additions and 1 deletions
|
@ -176,10 +176,22 @@ export default define({
|
||||||
post() {
|
post() {
|
||||||
this.posting = true;
|
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', {
|
this.$root.api('notes/create', {
|
||||||
text: this.text == '' ? undefined : this.text,
|
text: this.text == '' ? undefined : this.text,
|
||||||
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
|
||||||
visibility: this.$store.state.settings.defaultNoteVisibility
|
visibility,
|
||||||
|
localOnly,
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.clear();
|
this.clear();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
Loading…
Reference in a new issue