Don't persist follow-requests (IOS-192)

This commit is contained in:
Nathan Mattes 2023-12-28 23:45:30 +01:00
parent 71b28cb977
commit 77f0f28960
1 changed files with 0 additions and 21 deletions

View File

@ -26,27 +26,6 @@ extension APIService {
authorization: authenticationBox.userAuthorization
).singleOutput()
let managedObjectContext = self.backgroundManagedObjectContext
try await managedObjectContext.performChanges {
let request = MastodonUser.sortedFetchRequest
request.predicate = MastodonUser.predicate(
domain: authenticationBox.domain,
id: authenticationBox.userID
)
request.fetchLimit = 1
guard let user = managedObjectContext.safeFetch(request).first else { return }
guard let me = authenticationBox.authentication.user(in: managedObjectContext) else { return }
Persistence.MastodonUser.update(
mastodonUser: user,
context: Persistence.MastodonUser.RelationshipContext(
entity: response.value,
me: me,
networkDate: response.networkDate
)
)
}
return response
}