We don't use the author when composing toots (IOS-192)
This commit is contained in:
parent
11235f3f75
commit
71b28cb977
|
@ -552,14 +552,8 @@ extension ComposeContentViewModel {
|
|||
|
||||
public func statusPublisher() throws -> StatusPublisher {
|
||||
let authContext = self.authContext
|
||||
|
||||
// author
|
||||
let managedObjectContext = self.context.managedObjectContext
|
||||
var _author: ManagedObjectRecord<MastodonUser>?
|
||||
managedObjectContext.performAndWait {
|
||||
_author = authContext.mastodonAuthenticationBox.authentication.user(in: managedObjectContext)?.asRecord
|
||||
}
|
||||
guard let author = _author else {
|
||||
|
||||
guard authContext.mastodonAuthenticationBox.authentication.account() != nil else {
|
||||
throw AppError.badAuthentication
|
||||
}
|
||||
|
||||
|
@ -582,7 +576,6 @@ extension ComposeContentViewModel {
|
|||
}
|
||||
|
||||
return MastodonStatusPublisher(
|
||||
author: author,
|
||||
replyTo: {
|
||||
if case .reply(let status) = destination {
|
||||
return status
|
||||
|
|
|
@ -13,11 +13,6 @@ import MastodonCore
|
|||
import MastodonSDK
|
||||
|
||||
public final class MastodonStatusPublisher: NSObject, ProgressReporting {
|
||||
|
||||
// Input
|
||||
|
||||
// author
|
||||
public let author: ManagedObjectRecord<MastodonUser>
|
||||
// refer
|
||||
public let replyTo: MastodonStatus?
|
||||
// content warning
|
||||
|
@ -47,7 +42,6 @@ public final class MastodonStatusPublisher: NSObject, ProgressReporting {
|
|||
public var reactor: StatusPublisherReactor?
|
||||
|
||||
public init(
|
||||
author: ManagedObjectRecord<MastodonUser>,
|
||||
replyTo: MastodonStatus?,
|
||||
isContentWarningComposing: Bool,
|
||||
contentWarning: String,
|
||||
|
@ -61,7 +55,6 @@ public final class MastodonStatusPublisher: NSObject, ProgressReporting {
|
|||
visibility: Mastodon.Entity.Status.Visibility,
|
||||
language: String
|
||||
) {
|
||||
self.author = author
|
||||
self.replyTo = replyTo
|
||||
self.isContentWarningComposing = isContentWarningComposing
|
||||
self.contentWarning = contentWarning
|
||||
|
|
Loading…
Reference in New Issue