Skip to content

Commit f0e1008

Browse files
committed
Add warning to move EnvironmentClient.mastodonPost to httpClient.mastodonPost
1 parent 181ff65 commit f0e1008

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/App/Core/Dependencies/EnvironmentClient.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ struct EnvironmentClient {
4242
var currentReferenceCache: @Sendable () -> CurrentReferenceCache?
4343
var dbId: @Sendable () -> String?
4444
var mastodonCredentials: @Sendable () -> Mastodon.Credentials?
45-
var mastodonPost: @Sendable (_ client: Client, _ post: String) async throws -> Void
45+
#warning("drop client parameter and move this to httpClient")
46+
var mastodonPost: @Sendable (_ client: Client, _ message: String) async throws -> Void
4647
var random: @Sendable (_ range: ClosedRange<Double>) -> Double = { XCTFail("random"); return Double.random(in: $0) }
4748

4849
enum FailureMode: String {

Sources/App/Core/Social.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum Social {
105105
throw Error.invalidMessage
106106
}
107107
// Ignore errors from here for now to keep concurrency simpler
108-
async let _ = try? await environment.mastodonPost(client, message)
108+
async let _ = try? await environment.mastodonPost(client: client, message: message)
109109
}
110110

111111
static func postToFirehose(client: Client,

0 commit comments

Comments
 (0)