Set visibility to "direct" when replying to non-public post

This commit is contained in:
silverpill 2022-02-13 18:22:26 +00:00
parent 246ecd2e5b
commit 001a578eb9

View file

@ -90,6 +90,7 @@ import { Options, Vue, setup } from "vue-class-component"
import { Prop } from "vue-property-decorator" import { Prop } from "vue-property-decorator"
import { import {
Visibility,
VISIBILITY_MAP, VISIBILITY_MAP,
Post, Post,
createPost, createPost,
@ -118,7 +119,7 @@ export default class PostEditor extends Vue {
content = "" content = ""
attachment: Attachment | null = null attachment: Attachment | null = null
visibility = "public" visibility = Visibility.Public
mentions: string[] = [] mentions: string[] = []
visibilityMenuVisible = false visibilityMenuVisible = false
@ -140,8 +141,8 @@ export default class PostEditor extends Vue {
} }
created() { created() {
if (this.inReplyTo) { if (this.inReplyTo && this.inReplyTo.visibility !== Visibility.Public) {
this.visibility = this.inReplyTo.visibility this.visibility = Visibility.Direct
} }
} }