diff --git a/Tusker/Models/Draft.swift b/Tusker/Models/Draft.swift index ac9089fc93..c35cd22c73 100644 --- a/Tusker/Models/Draft.swift +++ b/Tusker/Models/Draft.swift @@ -119,10 +119,13 @@ extension MastodonController { func createDraft(inReplyToID: String? = nil, mentioningAcct: String? = nil) -> Draft { var acctsToMention = [String]() + var visibility = Preferences.shared.defaultPostVisibility + if let inReplyToID = inReplyToID, let inReplyTo = persistentContainer.status(for: inReplyToID) { acctsToMention.append(inReplyTo.account.acct) acctsToMention.append(contentsOf: inReplyTo.mentions.map(\.acct)) + visibility = inReplyTo.visibility } if let mentioningAcct = mentioningAcct { acctsToMention.append(mentioningAcct) @@ -136,6 +139,7 @@ extension MastodonController { draft.inReplyToID = inReplyToID draft.text = acctsToMention.map { "@\($0) " }.joined() draft.initialText = draft.text + draft.visibility = visibility return draft }